edwardconnect opened a new pull request, #4923: URL: https://github.com/apache/cassandra/pull/4923
Issue: [CASSANDRA-21491](https://issues.apache.org/jira/browse/CASSANDRA-21491) ### Problem `AbstractMessageHandler` is shared by native-transport and internode connections, but its reserve-capacity reactivation path unconditionally updates `ClientMetrics`. Internode messaging starts before native transport initializes those metrics, so reactivating a throttled internode connection can throw a `NullPointerException` and terminate the connection. ### Solution Move paused-client metric accounting behind a no-op connection-reactivation hook in `AbstractMessageHandler`, and override the hook in `CQLMessageHandler`. This keeps the existing native-transport metric behavior while ensuring internode backpressure does not access client-only metrics. Add a regression test that exercises internode reserve-capacity reactivation before `ClientMetrics` initialization. The test fails with the reported `NullPointerException` before the fix. ### Tests - `.build/sh/ai-ci-test org.apache.cassandra.net.AbstractMessageHandlerTest` - `.build/sh/ai-ci-test org.apache.cassandra.transport.RateLimitingTest` - `.build/sh/ai-build` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

