You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "ctubbsii (via GitHub)" <gi...@apache.org> on 2025/05/16 19:12:40 UTC

Re: [PR] Adds trace logging for java non blocking server memory limit [thrift]

ctubbsii commented on code in PR #3135:
URL: https://github.com/apache/thrift/pull/3135#discussion_r2093558710


##########
lib/java/src/main/java/org/apache/thrift/server/AbstractNonblockingServer.java:
##########
@@ -351,7 +359,13 @@ public boolean read() {
 
           // if this frame will push us over the memory limit, then return.
           // with luck, more memory will free up the next time around.
-          if (readBufferBytesAllocated.get() + frameSize > MAX_READ_BUFFER_BYTES) {
+          long currentAllocated = readBufferBytesAllocated.get();

Review Comment:
   In case the method is overridden, should probably use the new method to get this instead.
   
   ```suggestion
             long currentAllocated = getReadBufferBytesAllocated();
   ```



-- 
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: notifications-unsubscribe@thrift.apache.org

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