maedhroz commented on a change in pull request #1045:
URL: https://github.com/apache/cassandra/pull/1045#discussion_r686281466



##########
File path: src/java/org/apache/cassandra/transport/CQLMessageHandler.java
##########
@@ -466,13 +465,34 @@ protected boolean 
processFirstFrameOfLargeMessage(IntactFrame frame, Limit endpo
             
             LargeMessage largeMessage = new LargeMessage(header);
 
-            if (DatabaseDescriptor.getNativeTransportRateLimitingEnabled())
+            if (!acquireCapacity(header, endpointReserve, globalReserve))

Review comment:
       Absolutely agree with adding a few comments. It looks like we release in 
the exception handling path, but I also added a few assertions and a new test 
case in `RateLimitingTest` in this commit to put some guardrails around that.




-- 
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]

Reply via email to