-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support V3 and V4 of the native protocol #76
Comments
@clintascencio-datastax and myself would like to give this a try. We can try developing scodec Codecs for the native protocol in a separate module under scassandra and open up a PR when we've made some progress to get some feedback and if everything looks good we'll proceed on completing the codecs and writing them into the server code. |
I look forward to the PR :) |
I put this on the backburner for a little bit, but i'm revisiting this again. cassandra 3.0 is deprecating protocol v1 & v2 (CASSANDRA-10146), so would be good for scassandra to support v3 and v4 :). |
👍 for this, my application sets the driver up under the assumption of protocol v3, but that results in failure in test since SCassandra forces to v2. |
I'll get to this at some point I promise 😄! I'll make sure to do protocol v4 while i'm at it as well. |
Cassandra is already at 3.7, any plans to get scassandra up to parity with protocol and mapping layer? |
Hi @schrepfler, I agree, I am going to revisit this this weekend . I had a prototype reimplementing the protocol parsing using a scodec and it worked pretty well. |
I've made a lot of progress on this in the last couple of weeks. A PR should be coming in the next couple of days. The scope of the changes are pretty large so I imagine it will take a bit of time to review /work out any issues. It initially won't likely have support for UDTs (see #159), but it will support tuple, date, etc. and all of the other new types, in addition to allowing drivers to connect with protocol v3 and v4. |
… using scodec (#171) * Bump to 1.1.0 * Introduced standalone codec module for encoding/decoding native protocol messages. * Update driver dependencies. * Expect variables even if no prime is matched (enhancement). * Expect query parameters as they are now recorded (weren't before). * Default variable types on prime incoming. * Various fixes for protocol version nuances. ** Have collection-based data types consider protocol version for length. ** Batch considers protocol version for whether or not to include flags. ** Prepare considers protocol version for whether or not to include pks. ** native PF for encoding from Any -> Native type for data type. ** Use CL from statement only if prime does not include one. * Update tests to consider implicit protocol version. * Address some TODOs, remove obsolete ones. * Remove test that expected nothing for Options before Startup, we now return an error for any message sent before Startup (instead of just Query). * Send valid payloads. I.E. in the Startup case, it's not valid to send an empty body, isntead send 4 byte body with 0s for 'empty map'. * Add some DataType tests * Allow OPTIONS messages to be sent before STARTUP. * Special case text using Varchar codec. * Remove QueryFlags in favor of deriving them. * Add tests for QueryParameters being supressed (Except consistency level) for protocol version 1. * Improve tests for QueryParameters, fix bug * Move cql-antlr into tree * Update cql-antlr to support v3 and v4 types * Also update PrimingJsonImplicits for tuples and add start of TuplePriming test. * Nested collection support in cql-antlr. * Add nested tuple test to TuplePriming. * Update collection priming tests for nested collection validation * Add integration tests for protocol v3 and v4 types * Do a little bit of refactoring to facilitate common code driver21 and driver30 by creating a common-v3 module. This was required because TupleValue is part of the driver, so to prevent the common module from requiring driver 2.1+ a separate module was needed. Non-driver types like tinyint, smallint, date and time are accounted for in common, with methods in driver20 for returning those returning UnsupportedOperationException. * Implementation and Tests for protocol v4 error messages * WriteFailure, ReadFailure, and FunctionFailure result types. * Fix bug where the queryPatternPrimes were not showing up The /prime-query-single endpoint was not showing primes from the pattern store. They were still being used for prime selection on the other hand. * Add documentation for protocol v3 and v4 changes. * Rename BadCredentials to AuthenticationError. * Update readme to include new modules and note protocol version support. * Make more clear in documentation that standalone jar is the one that should be used. * Use spray-routing-shapeless23 to prevent conflict with scodec.
Investigate use of scodec at the same time.
At the moment if a client connects with V3 scassandra throws a protocol error to force the client back to V2 of the protocol
The text was updated successfully, but these errors were encountered: