You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "edwardconnect (via GitHub)" <gi...@apache.org> on 2026/07/10 17:16:10 UTC

[PR] CASSANDRA-21491: Prevent ClientMetrics NPE during internode reactivation [cassandra]

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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] CASSANDRA-21491: Prevent ClientMetrics NPE during internode reactivation [cassandra]

Posted by "iamaleksey (via GitHub)" <gi...@apache.org>.
iamaleksey closed pull request #4923: CASSANDRA-21491: Prevent ClientMetrics NPE during internode reactivation
URL: https://github.com/apache/cassandra/pull/4923


-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] CASSANDRA-21491: Prevent ClientMetrics NPE during internode reactivation [cassandra]

Posted by "iamaleksey (via GitHub)" <gi...@apache.org>.
iamaleksey commented on PR #4923:
URL: https://github.com/apache/cassandra/pull/4923#issuecomment-5078425623

   Committed as db0871ce8b82763c934ca88428589ecb00cd882a, cheers!


-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org