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

operateWithFailover fails against c* 1.2.1 when authentication is enabled. #584

Open
biddster opened this issue Jan 30, 2013 · 2 comments
Open

Comments

@biddster
Copy link

I'm kicking the tyres of cassandra 1.2.1 and have come across an issue.

I've enabled authentication using my own authenticator in cassandra. Most Hector operations fail as HConnectionManager.operateWIthFailover calls cassandraClient.set_keyspace (via client.getCassandra(op.keyspaceName) before calling c.login.

I get an InvalidRequestException (why: You have not logged in).

Looks like the code needs shuffling around to look something like this:

    client = pool.borrowClient();
     if ( op.credentials != null && !op.credentials.isEmpty() && !client.isAlreadyAuthenticated(op.credentials)) {
      client.login(op.credentials);
      client.setAuthenticated(op.credentials);
    }
    Cassandra.Client c = client.getCassandra(op.keyspaceName);

Note that this isn't a problem against c* 1.2.0. It's likely down to this bug that was fixed in 1.2.1.

https://issues.apache.org/jira/browse/CASSANDRA-5144

@zznate
Copy link
Collaborator

zznate commented Jan 30, 2013

I agree the fix is straightforward, but looks like we have a forcing function to move master to tracking 1.2 now as it will be incompatible with 1.1.x and 1.0.x of cassandra.

Thanks for the details.

@biddster
Copy link
Author

No problem, happy to contribute.

I see what you mean. Pretty sure the fix is backward compatible but it does mean you have to track 1.2.1 onwards.

jbojar added a commit to jbojar/hector that referenced this issue Apr 17, 2013
jbojar added a commit to jbojar/hector that referenced this issue Apr 17, 2013
…r fails against c* 1.2.1 when authentication is enabled
zznate added a commit that referenced this issue Apr 17, 2013
Patch for issue #584: operateWithFailover fails against c* 1.2.1 when authentication is enabled
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

2 participants