ztzg commented on a change in pull request #934: ZOOKEEPER-3301:Enforce the
quota limit
URL: https://github.com/apache/zookeeper/pull/934#discussion_r357033098
##########
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:
Wouldn't this mean that `LOG.warn("Quota exceeded: ...)` entries are
completely lost? I.e., not only do we not enforce the quota (as requested),
but no warnings are produced. Is that the intent?
----------------------------------------------------------------
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