[ https://issues.apache.org/jira/browse/ZOOKEEPER-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13250375#comment-13250375 ]
Jay Shrauner commented on ZOOKEEPER-1383: ----------------------------------------- I looked at the old StatsNode deserialization code and it is possible to make this backwards compatible by exploiting some quirks in the old parsing code. The old stats nodes were serialized as "count=5,bytes=4" We can add new quota/stats types using the following format "count=5,bytes=4=;bytesPerSec=100;countHardLimit=10" The old parsing code will assert if there isn't exactly 1 ',', and it expects (but doesn't verify) that the first element is count and the second is bytes. So we put those two fields first and use semi-colons to separate all the new fields. The extra '=' after the bytes field is what tricks the old parsing into ignoring all the new fields. > Create update throughput quotas and add hard quota limits > --------------------------------------------------------- > > Key: ZOOKEEPER-1383 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1383 > Project: ZooKeeper > Issue Type: New Feature > Components: server > Reporter: Jay Shrauner > Assignee: Jay Shrauner > Priority: Minor > Fix For: 3.5.0 > > Attachments: ZOOKEEPER-1383.patch, ZOOKEEPER-1383.patch > > > Quotas exist for size (node count and size in bytes); it would be useful to > track and support quotas on update throughput (bytes per second) as well. > This can be tracked on both a node/subtree level for quota support as well as > on the server level for monitoring. > In addition, the existing quotas log a warning when they are exceeded but > allow the transaction to proceed (soft quotas). It would also be useful to > support a corresponding set of hard quota limits that fail the transaction. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira