Summary
ProtocolInitHandler sends SELECT cluster_name FROM system.local WHERE key='local' after startup/authentication on every physical connection, including pooled connections. Drop this query from connection initialization.
Motivation
The cluster-name check adds an extra query round trip to every connection. Cluster identity should not require a per-connection system.local read.
Scope
- Remove
CLUSTER_NAME_QUERY and the GET_CLUSTER_NAME initialization step.
- After startup/authentication, proceed directly to
NODE_INFO_QUERY when fetchNodeInfo is enabled; otherwise continue with keyspace/event registration initialization.
- Remove or update cluster-name mismatch handling and
DriverChannel.CLUSTER_NAME_KEY consumers as needed.
- Update protocol initialization tests to verify pooled connections no longer send the cluster-name query.
- Preserve
NODE_INFO_QUERY behavior for control connections that must identify an unknown contact point.
Summary
ProtocolInitHandlersendsSELECT cluster_name FROM system.local WHERE key='local'after startup/authentication on every physical connection, including pooled connections. Drop this query from connection initialization.Motivation
The cluster-name check adds an extra query round trip to every connection. Cluster identity should not require a per-connection
system.localread.Scope
CLUSTER_NAME_QUERYand theGET_CLUSTER_NAMEinitialization step.NODE_INFO_QUERYwhenfetchNodeInfois enabled; otherwise continue with keyspace/event registration initialization.DriverChannel.CLUSTER_NAME_KEYconsumers as needed.NODE_INFO_QUERYbehavior for control connections that must identify an unknown contact point.