[
https://issues.apache.org/jira/browse/ZOOKEEPER-1638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13586988#comment-13586988
]
Flavio Junqueira commented on ZOOKEEPER-1638:
---------------------------------------------
Weird, both calls to clear() have been added in the same patch, ZOOKEEPER-596.
It was probably overlooked in the review. I don't see a problem with removing
this one, it doesn't make sense to call it twice.
I'm looking at related issues, but this one seems to be independent, good catch.
> Redundant zk.getZKDatabase().clear();
> -------------------------------------
>
> Key: ZOOKEEPER-1638
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1638
> Project: ZooKeeper
> Issue Type: Improvement
> Reporter: Alexander Shraer
> Priority: Trivial
> Labels: newbie
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-1638.patch
>
>
> Learner.syncWithLeader calls zk.getZKDatabase().clear() right before
> zk.getZKDatabase().deserializeSnapshot(leaderIs); Then the first thing
> deserializeSnapshot does is another clear().
> Suggest to remove the clear() in syncWithLeader.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira