Skip to content

3.x: Drop CLUSTER_NAME_QUERY from protocol initialization #998

Description

@dkropachev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions