reddit/baseplate.py

Prevent different Cassandra client contexts from using the same ExecutionProfile object

ckw4ng opened this issue · 0 comments

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.