Skip to content

Fix Client RequestsSize metric always reporting 0 for native protocol v5 connections - #5120

Open
amalsebs wants to merge 1 commit into
apache:trunkfrom
amalsebs:CASSANDRA-21091
Open

Fix Client RequestsSize metric always reporting 0 for native protocol v5 connections#5120
amalsebs wants to merge 1 commit into
apache:trunkfrom
amalsebs:CASSANDRA-21091

Conversation

@amalsebs

@amalsebs amalsebs commented Sep 6, 2026

Copy link
Copy Markdown

V5 only touches the shared reserve once a connection's local queue budget is exceeded, so normal traffic never hits the counter this metric reads. V4 always hits it, which is why the gauge worked there but not on v5.

Added hooks in AbstractMessageHandler so both paths report to the same counter regardless of whether the reserve was actually used, and pointed ClientMetrics at that instead. Didn't touch backpressure/admission control at all.

Added a test in CQLConnectionTest that reproduces this - reserve stays at 0 but the gauge still moves.

Ran transport/metrics/net/cql3 test packages + ant check locally on JDK 17, all green.

CASSANDRA-21091

… v5+ connections

V5 connections only draw on the shared endpoint/global reserve once a connection's private queue budget is exceeded, so ordinary traffic never touches the counter this metric reads from. V4 always does, which is why only v5 was affected.

patch by Amal Sebastian for CASSANDRA-21091
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant