Skip to content

Commit dd00221

Browse files
mykauldkropachev
authored andcommitted
(improvement) do not fetch * from system.local and system.peers, but specific columns
Specifically, supported_features took quite some space. Fetching only what is useful for the client. In follow-up PRs, will remove some (now) dead code that may have relied on some of those columns. Refs: scylladb/scylla-drivers#11 Signed-off-by: Yaniv Kaul <[email protected]>
1 parent 849ebec commit dd00221

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cassandra/cluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3444,9 +3444,9 @@ class ControlConnection(object):
34443444
Internal
34453445
"""
34463446

3447-
_SELECT_PEERS = "SELECT * FROM system.peers"
3447+
_SELECT_PEERS = "SELECT peer, data_center, host_id, rack, release_version, rpc_address, schema_version, tokens FROM system.peers"
34483448
_SELECT_PEERS_NO_TOKENS_TEMPLATE = "SELECT host_id, peer, data_center, rack, rpc_address, {nt_col_name}, release_version, schema_version FROM system.peers"
3449-
_SELECT_LOCAL = "SELECT * FROM system.local WHERE key='local'"
3449+
_SELECT_LOCAL = "SELECT broadcast_address, cluster_name, data_center, host_id, listen_address, partitioner, rack, release_version, rpc_address, schema_version, tokens FROM system.local WHERE key='local'"
34503450
_SELECT_LOCAL_NO_TOKENS = "SELECT host_id, cluster_name, data_center, rack, partitioner, release_version, schema_version, rpc_address FROM system.local WHERE key='local'"
34513451
# Used only when token_metadata_enabled is set to False
34523452
_SELECT_LOCAL_NO_TOKENS_RPC_ADDRESS = "SELECT rpc_address FROM system.local WHERE key='local'"

0 commit comments

Comments
 (0)