Skip to content
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

Critical bug in CQL version selection #600

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

Critical bug in CQL version selection #600

malexejev opened this issue Mar 15, 2013 · 0 comments

Comments

@malexejev
Copy link

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 pushed a commit to Mishail/hector that referenced this issue Jun 28, 2013
If CQL version is set for a query, then enforce that for each execution
zznate added a commit that referenced this issue Jun 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant