maoling commented on a change in pull request #934: ZOOKEEPER-3301:Enforce the 
quota limit
URL: https://github.com/apache/zookeeper/pull/934#discussion_r383069272
 
 

 ##########
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/PrepRequestProcessor.java
 ##########
 @@ -286,6 +293,91 @@ void rollbackPendingChanges(long zxid, Map<String, 
ChangeRecord>pendingChangeRec
         }
     }
 
+    /**
+     * check whether exceeded the quota.
+     *
+     * @param lastPrefix
+     *            the path of the node that is quotaed.
+     * @param bytesDiff
+     *            the diff to be added to number of bytes
+     * @param countDiff
+     *            the diff to be added to the count
+     */
+    private void checkQuota(String lastPrefix, long bytesDiff, int countDiff)
+            throws KeeperException.QuotaExceededException {
+        if (!enforeQuota) {
+            return;
 
 Review comment:
   `enforeQuota`  enables by default. When it disables, users will see a log to 
show disable infos at the start-up of server and the `LOG.warn("Quota exceeded: 
...)` will never been seen

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to