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

Prevent different Cassandra client contexts from using the same ExecutionProfile object #585

Open
ckw4ng opened this issue Apr 23, 2021 · 0 comments

Comments

@ckw4ng
Copy link
Contributor

ckw4ng commented Apr 23, 2021

The underlying cassandra library that Basepate.py uses relies on the LoadBalancingPolicy that gets created alongside an ExecutionProfile to manage a list of candidate Cassandra cluster hosts for queries. This can lead to issues when an ExecutionProfile instance object is passed to multiple cluster_from_config calls for different Cassandra clusters. Each cluster will attach the same ExecutionProfile instance and LoadBalancingPolicy, which might end up containing hosts that aren't even in the cluster because of other clusters overwriting the host data.

It would be good to have some guardrails in place to prevent this sharing of ExecutionProfile objects, and instead explicitly have new profiles be created.

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

No branches or pull requests

1 participant