Critical bug in CQL version selection #600

Open
malexejev opened this Issue Mar 15, 2013 · 0 comments

Comments

Projects
None yet
1 participant

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
https://gist.github.com/malexejev/5170374 usage

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

-Max

Mishail added a commit to Mishail/hector that referenced this issue Jun 28, 2013

ref hector-client/hector#600
If CQL version is set for a query, then enforce that for each execution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment