[ https://issues.apache.org/jira/browse/ZOOKEEPER-2660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15832183#comment-15832183
]
Arshad Mohammad edited comment on ZOOKEEPER-2660 at 1/20/17 6:02 PM:
---------------------------------------------------------------------
Thanks [~Yongcheng] for reporting this issue, though it is duplicate of ZOOKEEPER-2307. I
am closing it as duplicate. Please feel free to reopen If you disagree.
was (Author: arshad.mohammad):
Thanks [~Yongcheng] for reporting this issue, though it is duplicate of ZOOKEEPER-2660. I
am closing it as duplicate. Please feel free to reopen If you disagree.
> acceptedEpoch and currentEpoch data inconsistency, ZK process can not start!
> ----------------------------------------------------------------------------
>
> Key: ZOOKEEPER-2660
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2660
> Project: ZooKeeper
> Issue Type: Bug
> Components: quorum
> Affects Versions: 3.4.6, 3.4.9
> Environment: ZK: 3.4.9
> Reporter: Yongcheng Liu
>
> 1. currentEpoch is bigger than acceptedEpoch, ZK will throw IOException when start loadDataBase.
> 2. function bug. In function setAcceptedEpoch and setCurrentEpoch, it is modify memory
variable first, then write epoch to file. If write file failed, the memory has been modified.
> solution as follow:
> for example,
> public void setAcceptedEpoch(long e) throws IOException {
> acceptedEpoch = e;
> writeLongToFile(ACCEPTED_EPOCH_FILENAME, e);
> }
> need to modify as follow:
> public void setAcceptedEpoch(long e) throws IOException {
> writeLongToFile(ACCEPTED_EPOCH_FILENAME, e);
> acceptedEpoch = e;
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
|