[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13250838#comment-13250838
 ] 

Jay Shrauner commented on ZOOKEEPER-1383:
-----------------------------------------

To clarify a bit: stats and quota nodes are serialized as strings, and the 
current code in StatsTrack expects them to serialize and parse identically with 
only 2 fields. This makes adding new fields problematic, and we need to add new 
fields to both stats and quota nodes for throughput quotas and we need to add 
new fields to quota nodes for hard limit quotas.

Fortunately, the parsing code in the StatsTrack constructor leaves an opening 
to add new fields if we don't use commas and string them after an extra = sign 
after the 'bytes=4' portion of the string. It's definitely a bit hacky, but it 
works, and it seems the easiest way to allow us to add new fields. I've added 
new checks in the unit tests to verify that the current StatsTrack parser 
continues to parse correctly the new stats/quota nodes.

I've also changed the parser so it can handle parsing unrecognized fields, 
which should make it easier to add new quota type in the future without having 
these backwards compatibility issues.
                
> 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, 
> 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

        

Reply via email to