Skip to content

1.1.0

Compare
Choose a tag to compare
@thibaultcha thibaultcha released this 23 Jan 23:07
· 95 commits to master since this release
1.1.0
Changed
  • ⚠️ Peers are now part of different connection pools depending on their
    keyspace. This can fix eventual issues when using several keyspaces with a
    single peer/cluster instance.
    6c0db5e
    This is a breaking change:

      -- before:
      local peer = cassandra.new()
      peer:connect()
      peer:set_keyspace('my_keyspace')
    
      -- after:
      local peer = cassandra.new()
      peer:connect()
      peer:change_keyspace('my_keyspace') -- closes the underlying connection and open a new one
Added
  • New coordinator_options for execute()/batch()/iterate() allowing for
    more granularity in keyspace settings. Accepted options are keyspace and
    no_keyspace. Example:

      local Cluster = cluster.new {
        keyspace = 'my_keyspace'
      }
    
      local res = cluster:execute('SELECT * FROM local', nil, {
        keyspace = 'system' -- will spawn or reuse a peer with 'system' keyspace
        --no_keyspace = true -- would disable setting a keyspace for this request
      })

    cdc6607

  • Support for binary protocol v4.
    #61

    • New cassandra.null CQL marshalling type. This type is different than
      cassandra.unset for protocol v4 and will set to null existing columns
      (in protocol v4 usage only).
    • Parse SCHEMA_CHANGE results for FUNCTION and AGGREGATE.
    • The Cluster module now parses warnings contained in response frames and
      logs them at the ngx.WARN level.
  • Implement a silent option for Cluster.new() to disable logging in the
    nginx error logs.
    #60

  • Implement a lock_timeout option for Cluster.new() to specify a max
    waiting time in seconds for the cluster refreshing and requests preparing
    mutexes. This option prevents such mutexes to hang for too long.
    2bd3d66

  • The cluster:refresh() method now returns the list of fetched Cassandra
    nodes from the cluster as a third return value.
    34f5f11

Fixed
  • Correctly logs the address of peers being set UP or DOWN in the warning logs.
    40fd870
  • Better error messages for SSL handshake/locking failures.
  • Better handling in case the shm containing the cluster info is full. We do
    not override previous values at the risk of losing cluster nodes info, but
    error out with the "no memory" error instead.
    4520a3b
  • Correctly receives read and connect timeout options.
    #71
  • Log the reason behind retrying a request in the cluster module.
    #71
  • Fallback on listen_address when rpc_address is "bind all" when refreshing
    the cluster nodes with the cluster module.
    #72
  • Propagate the CQL version in use when marshalling CQL collection types such
    as map, set, tuple or udt. We now properly marshall such nested CQL values.
    #73