smiklosovic commented on code in PR #4840:
URL: https://github.com/apache/cassandra/pull/4840#discussion_r3303682393


##########
src/java/org/apache/cassandra/utils/memory/BufferPool.java:
##########
@@ -825,7 +826,7 @@ public void put(ByteBuffer buffer)
             else
             {
                 put(buffer, chunk);
-                memoryInUse.add(-size);
+                memoryInUse.inc(-size);

Review Comment:
   I think it would be more readable if we used `memoryInUse.dec(size)` instead 
of `memoryInUse.inc(-size)`. What do we have `dec` method for then? :) Applies 
for other cases in this patch. 



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