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 Sun, 08 Sep 2019 09:33:15 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_r321999985
 
 

 ##########
 File path: zookeeper-jute/src/main/java/org/apache/jute/BinaryInputArchive.java
 ##########
 @@ -85,6 +85,18 @@ public String readString(String tag) throws IOException {
     }
     
     static public final int maxBuffer = Integer.getInteger("jute.maxbuffer", 0xfffff);
 
 Review comment:
   In order to have better testing we can do as follows:
   - make maxBuffer and readExtraSize two instance variables
   - add two new constants (final static) DEFAULT_MAX_BUFFER and DEFAULT_READEXTRASIZE initialized
with the system properties
   - in the constructor initialize the value using DEFAULT_MAX_BUFFER and DEFAULT_READEXTRASIZE
   - add a new constructor that allows to initialize maxBuffer and readExtraSize
   - add only unit tests about BinaryInputArchive, and not end to end tests

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