maoling commented on a change in pull request #934: ZOOKEEPER-3301:Enforce the
quota limit
URL: https://github.com/apache/zookeeper/pull/934#discussion_r383097010
##########
File path:
zookeeper-server/src/main/java/org/apache/zookeeper/cli/DelQuotaCommand.java
##########
@@ -129,7 +137,23 @@ public static boolean delQuota(ZooKeeper zk, String path,
}
// cut the tree till their is more than one child
trimProcQuotas(zk, parentPath);
+ } else {
+ if (quota.getCount() > 0) {
+ strack.setCount(-1);
+ }
+ if (quota.getBytes() > 0) {
+ strack.setBytes(-1L);
+ }
+ if (quota.getCountHardLimit() > 0) {
+ strack.setCountHardLimit(-1);
+ }
+ if (quota.getByteHardLimit() > 0) {
+ strack.setByteHardLimit(-1L);
+ }
+
+ zk.setData(quotaPath, strack.toString().getBytes(), -1);
Review comment:
Add a new method `public byte[] getStatsBytes()`
----------------------------------------------------------------
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