zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] anmolnar commented on a change in pull request #769: ZOOKEEPER-3242: Add server side connecting throttling
Date Tue, 22 Jan 2019 11:28:45 GMT
anmolnar commented on a change in pull request #769: ZOOKEEPER-3242: Add server side connecting
throttling
URL: https://github.com/apache/zookeeper/pull/769#discussion_r249741175
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
 ##########
 @@ -196,14 +199,50 @@ public ZooKeeperServer(FileTxnSnapLog txnLogFactory, int tickTime,
         setMinSessionTimeout(minSessionTimeout);
         setMaxSessionTimeout(maxSessionTimeout);
         listener = new ZooKeeperServerListenerImpl(this);
+
         readResponseCache = new ResponseCache();
+
+        connThrottle = new BlueThrottle();
 
 Review comment:
   This configuration setting block could be a little bit neater by following the existing
pattern in this class: create static constants for the configuration option name and the default
value.
   
   The existing config setting `intBufferStartingSizeBytes` is set via static constructor
which is not convenient here, but you could overload the constructor of `BlueThrottle` to
override the default settings. In which case you don't need these setters at all.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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