zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arshad Mohammad (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2660) acceptedEpoch and currentEpoch data inconsistency, ZK process can not start!
Date Fri, 20 Jan 2017 17:58:27 GMT

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

Arshad Mohammad commented on ZOOKEEPER-2660:
--------------------------------------------

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)

Mime
View raw message