[
https://issues.apache.org/jira/browse/ZOOKEEPER-1097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050743#comment-13050743
]
Henry Robinson commented on ZOOKEEPER-1097:
-------------------------------------------
Patch looks good to me, all I have are stylistic nits. Happy to commit after
these are addressed.
1. Trailing whitespace after:
- if (thisStats.getCount() < updatedStat.getCount()) {
+ if (thisStats.getCount() > -1 && (thisStats.getCount() <
updatedStat.getCount())) {
2. You've reformatted one 'quota exceded' log message, but not the other. Would
be good to be consistent.
3. Should isQuotaSet be a public API? If so, it should have Javadoc. Either
way, it's confusing for a method called is* to not return a boolean. Consider
renaming it to, dunno, getMaxPrefixWithQuota ?
4. The 'return null' else-clause of the if statement in isQuotaSet should be
inside a { } pair, for consistency with the if clause.
5. Just checking - the stop / start / stop / start at the end of testQuota
needs to have two rounds of restarts to be a correct test?
6. Generally better to use assertEquals rather than assertTrue when you are
comparing values, it can help debuggers give better information about the test
failure and makes it easier to write correct tests. (I know this is an
inherited issue with this test).
> Quota is not correctly rehydrated on snapshot reload
> ----------------------------------------------------
>
> Key: ZOOKEEPER-1097
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1097
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.3.3, 3.4.0
> Reporter: Camille Fournier
> Assignee: Camille Fournier
> Priority: Blocker
> Fix For: 3.3.4, 3.4.0
>
> Attachments: ZOOKEEPER-1097.patch
>
>
> traverseNode in DataTree will never actually traverse the limit nodes
> properly.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira