Skip to content

Commit

Permalink
Merge pull request #252 from mykaul/issue_245
Browse files Browse the repository at this point in the history
Connection to a ScyllaDB cluster is delayed as the driver tries to qu…
  • Loading branch information
Lorak-mmk authored Sep 26, 2023
2 parents d735957 + 83d7394 commit d12d2c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cassandra/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -3668,6 +3668,11 @@ def _try_connect(self, host):
"registering watchers and refreshing schema and topology",
connection)

# Indirect way to determine if conencted to a ScyllaDB cluster, which does not support peers_v2
# If sharding information is available, it's a ScyllaDB cluster, so do not use peers_v2 table.
if connection.features.sharding_info is not None:
self._uses_peers_v2 = False

# use weak references in both directions
# _clear_watcher will be called when this ControlConnection is about to be finalized
# _watch_callback will get the actual callback from the Connection and relay it to
Expand Down

0 comments on commit d12d2c1

Please sign in to comment.