Jens-G commented on a change in pull request #2533:
URL: https://github.com/apache/thrift/pull/2533#discussion_r815304655



##########
File path: lib/java/src/org/apache/thrift/server/AbstractNonblockingServer.java
##########
@@ -64,6 +65,7 @@ public 
AbstractNonblockingServerArgs(TNonblockingServerTransport transport) {
    * right into an out of memory exception, rather than waiting.
    */
   final long MAX_READ_BUFFER_BYTES;
+  final long MAX_READ_FRAME_BYTES;

Review comment:
       Why do we need another constant?

##########
File path: lib/java/src/org/apache/thrift/server/AbstractNonblockingServer.java
##########
@@ -51,6 +51,7 @@
 
   public static abstract class AbstractNonblockingServerArgs<T extends 
AbstractNonblockingServerArgs<T>> extends AbstractServerArgs<T> {
     public long maxReadBufferBytes = 256 * 1024 * 1024;
+    public long maxReadFrameBytes = 256 * 1024 * 1024;

Review comment:
       Why do we need another constant?

##########
File path: lib/java/src/org/apache/thrift/server/AbstractNonblockingServer.java
##########
@@ -352,9 +355,10 @@ public boolean read() {
 
           // if this frame will always be too large for this server, log the
           // error and close the connection.
-          if (frameSize > MAX_READ_BUFFER_BYTES) {
+          if (frameSize > MAX_READ_FRAME_BYTES) {

Review comment:
       Why do we need another constant?

##########
File path: lib/java/src/org/apache/thrift/server/AbstractNonblockingServer.java
##########
@@ -73,6 +75,7 @@ public 
AbstractNonblockingServerArgs(TNonblockingServerTransport transport) {
   public AbstractNonblockingServer(AbstractNonblockingServerArgs args) {
     super(args);
     MAX_READ_BUFFER_BYTES = args.maxReadBufferBytes;
+    MAX_READ_FRAME_BYTES = args.maxReadFrameBytes;

Review comment:
       Why do we need another constant?




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


Reply via email to