zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] eolivelli commented on a change in pull request #1080: ZOOKEEPER-3496: Transaction larger than jute.maxbuffer makes ZooKeeper service unavailable
Date Thu, 05 Sep 2019 16:15:06 GMT
eolivelli commented on a change in pull request #1080: ZOOKEEPER-3496: Transaction larger than
jute.maxbuffer makes ZooKeeper service unavailable
URL: https://github.com/apache/zookeeper/pull/1080#discussion_r321356483
 
 

 ##########
 File path: zookeeper-jute/src/main/java/org/apache/jute/BinaryInputArchive.java
 ##########
 @@ -85,6 +85,14 @@ public String readString(String tag) throws IOException {
     }
     
     static public final int maxBuffer = Integer.getInteger("jute.maxbuffer", 0xfffff);
+    static public int readExtraSize = Integer.getInteger("zookeeper.jute.maxbuffer.extrasize",
+            maxBuffer);
+    static {
+        // Earlier hard coded value is 1024, So the value should not be less than that
+        if (readExtraSize < 1024) {
 
 Review comment:
   Assign an initial value to a temp variable here, do this small computation, then assign
the value to the variable.
   It is legal to assign a value in a static block to a final static field, the only constraint
is that you do the assignement only once

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message