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

Unable to create multiple lsh indices each one in its own keyspace - issue #171 #172

Merged
merged 1 commit into from Feb 4, 2022
Merged

Unable to create multiple lsh indices each one in its own keyspace - issue #171 #172

merged 1 commit into from Feb 4, 2022

Conversation

ronassa
Copy link
Contributor

@ronassa ronassa commented Jan 16, 2022

  • omitting keyspace when connecting to Cassandra, this will set the default Cassandra keyspace
  • when running get_session if the current keyspace is not the same as the configuration we create the keyspace if needed and set it as current.

@ronassa ronassa changed the title Unable to create multiple lsh indices each one in its own keyspace #171 Unable to create multiple lsh indices each one in its own keyspace - issue #171 Jan 16, 2022
@ekzhu
Copy link
Owner

ekzhu commented Jan 24, 2022

Thanks for the pull request! What happens if a keyspace A is already present, and a connection was created to uses keyspace B, but later another one was created to use A again? Is creating keyspace idempotent?

@ronassa
Copy link
Contributor Author

ronassa commented Jan 30, 2022

yes. if you try to create a keyspace that exists it will skip.

QUERY_CREATE_KEYSPACE = """
CREATE KEYSPACE IF NOT EXISTS {keyspace}
WITH replication = {replication}
"""

@ekzhu ekzhu merged commit 3d90696 into ekzhu:master Feb 4, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants