Skip to content

Commit 83d7394

Browse files
committed
Connection to a ScyllaDB cluster is delayed as the driver tries to query system.peers_v2 table
The logic is now that if there is sharding information available, it's a Scylla cluster and then do NOT try to use that table. Fixes: scylladb#245 Signed-off-by: Yaniv Kaul <[email protected]>
1 parent d735957 commit 83d7394

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cassandra/cluster.py

+5
Original file line numberDiff line numberDiff line change
@@ -3668,6 +3668,11 @@ def _try_connect(self, host):
36683668
"registering watchers and refreshing schema and topology",
36693669
connection)
36703670

3671+
# Indirect way to determine if conencted to a ScyllaDB cluster, which does not support peers_v2
3672+
# If sharding information is available, it's a ScyllaDB cluster, so do not use peers_v2 table.
3673+
if connection.features.sharding_info is not None:
3674+
self._uses_peers_v2 = False
3675+
36713676
# use weak references in both directions
36723677
# _clear_watcher will be called when this ControlConnection is about to be finalized
36733678
# _watch_callback will get the actual callback from the Connection and relay it to

0 commit comments

Comments
 (0)