Skip to content

Releases: thibaultcha/lua-cassandra

0.5.0

03 Feb 09:23
Compare
Choose a tag to compare
Changed
  • Following Datastax's model and allowing better flexibility with various C* providers, authentication now happens with an AuthProvider table that must be instanciated and passed to a session's options. Example:

    local session, err = cassandra.spawn_session {
      shm = "...",
      contact_points = {...},
      username = "username",
      password = "password"
    }

    Becomes:

    local session, err = cassandra.spawn_session {
      shm = "...",
      contact_points = {...},
      auth = cassandra.auth.PlainTextProvider("username", "password")
    }

    The cassandra module contains AuthProviders in cassandra.auth. Only PlainTextProvider is currently implemented.

  • Remove the set_log_lvl() function from the cassandra module.

Added
  • Stronger test suite and new specs for SSL and Authentication.

0.4.2

16 Jan 22:57
Compare
Choose a tag to compare
Fixed
  • Correct timeout check for schema consensus. Prior to this, schema consensus systematically timed out after 0.5s. #24
Added
  • More documentation.
  • Stronger test suite and CI.

0.4.1

16 Jan 22:56
0.4.1
Compare
Choose a tag to compare
Fixed

0.4.0

18 Dec 21:00
0.4.0
Compare
Choose a tag to compare

Complete rewrite of the driver, to the exception of the serializers.

Breaking changes

This release is a complete breaking change with previous versions of the driver. #15

Added
  • Cluster topology auto detection. contact_points are not used as the only available nodes anymore but as entry point to discover the cluster's topology.
  • Cluster awareness capabilities. The driver is now capable of keeping track of which nodes are healthy or unhealthy.
  • Load balancing, reconnection, retry and address resolution policies. Only one of each is currently implemented.
    • Load balancing: shared round-robin accross all workers. Used to load-balance the queries in the cluster.
    • Reconnection: shared exponential (exponential reconnection time shared accross all workers). Used to determine when an unhealthy node should be retried.
    • Retry: a basic retry policy. Used to determine which queries to retry or throw errors.
    • Address resolution: a basic address resolution policy. Used to resolve rpc_address fields.
  • Waiting for schema consensus between nodes on SCHEMA_CHANGE (DML queries).
  • Many more options, configurable per session/query (queries can be executed with options overriding the session's option).
  • Complete abstraction of prepared queries. A simple option to execute() will handle the query preparation. If a node throws an UNPREPARED error, the query will be prepared and retried seamlessly.
  • Stronger test suite. Unit/integration tests with Busted, and ngx_lua integration tests with Test::Nginx Perl module. Travis-CI jobs are also faster and more reliable, and run all test suites.
  • Binary protocol auto-detection: downgrade from 3 to 2 automatically when using C* 2.0.
  • Compatible with Lua 5.1, 5.2, 5.3, LuaJIT.
  • Overall, a better architecture for a better maintainability.
Unchanged
  • Still optimized for ngx_lua (cosocket API) and plain Lua (with LuaSocket).
  • TLS client-to-node encryption and Authentication (PasswordAuthenticator) are still supported.
  • The serializers stayed the same (even if their architecture was rewritten).
Removed
  • No more support for query tracing (will be added back later).

0.3.6

18 Dec 21:00
Compare
Choose a tag to compare
Added
  • Better error handling in case of CA certificate error with Luasocket.
  • Port number in addition to host in socket errors.
Fixed
  • Shuffling of contact points array.

0.3.5

30 Jul 00:01
Compare
Choose a tag to compare
Added
  • Expose consistency and batch types constants in cassandra.
  • Better SSL handshake error handling.

0.3.3

30 Jul 00:01
Compare
Choose a tag to compare
Fixed
  • Binary protocol v3 accidentally used v2 encoding methods.
  • Startup message accidentally being sent for already established connections (with reusable sockets).

0.3.0

30 Jul 00:01
Compare
Choose a tag to compare
Added
  • Support for SSL encryption (client/server).
Fixed
  • IPv6 addresses encoding.

0.2.0

30 Jul 00:01
Compare
Choose a tag to compare
Added
  • Support for authentication (Password Authenticator).

0.1.0

30 Jul 00:00
Compare
Choose a tag to compare

Initial release. Forked from jbochi/lua-resty-cassandra v0.5.7 with some additional features and bug fixes.

Added
  • Support for both binary protocols v2 and v3.
Changed
  • More friendly support of auto pagination. THe loop doesn't require as many parameters.
  • OOP style in order to support both binary protocols. cassandra.new() must now be called with :.
Fixed
  • set_keyspace erroring on names with capital letters.