GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Relates to #547 (better, #547 should be reopened)
Currently, cqlVersion may be set for Query and ExecutingKeyspace. However, ExecutingKeyspace uses HConnectionManager with a pool of Cassandra clients, with exact client selected by LoadBalancingPolicy inside HConnectionManager implementation.
Current implementation checks cqlVersions to be equal for Query and Keyspace, so it applies version to the first client it gets and any other query, which gets different Cassandra.Client for execution, just ignores the version setup (remember, version was set equal for Query and Keyspace).
Eventually, only one of Keyspace connections to Cassandra works with configured version, and all other connections work with default version.
Instead of cqlVersion stored in Query and Keyspace, #547 had to use Query and Cassandra.Client combination (or connection, or HClient impl - something specific the the underlying Thrift connection to Cassandra).
As the feature does not work yet, I provide code for my workaround:
https://gist.github.com/malexejev/5170300 my client
https://gist.github.com/malexejev/5170342 my factory
My way to go is a clear workaround and does not support per-query version, so I don't provide any pull request to fix the issue. Sorry guys
If CQL version is set for a query, then enforce that for each execution
Merge pull request #626 from Mishail/issues-600