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

CassandraAdminTemplate.getKeyspaceMetadata() fail for a case-sensitive keyspace [DATACASS-720] #887

spring-projects-issues opened this issue Jan 17, 2020 · 2 comments


Copy link

@spring-projects-issues spring-projects-issues commented Jan 17, 2020

Samuel Padou opened DATACASS-720 and commented

Using CassandraAdminTemplate.getKeyspaceMetadata() when connected to a case-sensitive keyspace (using quotes) fail to retrieve the metadata.

Look like in this line:

KeyspaceMetadata keyspaceMetadata = session.getCluster().getMetadata().getKeyspace(session.getLoggedKeyspace());

session.getLoggedKeyspace() does not automatically quote the keyspace identifier if needed, but metadata.getKeyspace() expect it to be (otherwise it use the lowercase keyspace and does not find it). Using Metadata.quoteIfNecessary() around the logged keyspace should work i think

Affects: 2.1.15 (Lovelace SR15), 2.2.4 (Moore SR4)

Referenced from: pull request #170, and commits 39cce44, 89ac6cf, 80e6189, 3ed752f, bd0b3bd, 3a145b1

Backported to: 2.1.16 (Lovelace SR16)

Copy link

@spring-projects-issues spring-projects-issues commented Jan 17, 2020

Mark Paluch commented

Good catch. Care to submit a pull request against the 2.2.x branch? Our current master has upgraded already to the Cassandra driver 4 which uses internally CqlIdentifier and does no longer face this issue

Copy link

@spring-projects-issues spring-projects-issues commented Jan 18, 2020

Samuel Padou commented

Sure, added a pull request for this fix:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants