You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "pengWei Dou (Jira)" <ji...@apache.org> on 2020/11/19 12:46:00 UTC
[jira] [Comment Edited] (ZOOKEEPER-4005) Zookeeper will not sync
snapshot while get DIFF and cause start failed.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-4005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17235384#comment-17235384 ]
pengWei Dou edited comment on ZOOKEEPER-4005 at 11/19/20, 12:45 PM:
--------------------------------------------------------------------
[~hanm] , yes, we can disable check snapshot during upgrade, but we should't always disable it, that means we need to modify configuration again while upgrade completed. so i think we can do this as follow:
{code:java}
// code placeholder
if (qp.getType() == Leader.DIFF) {
LOG.info("Getting a diff from the leader 0x{}", Long.toHexString(qp.getZxid()));
//add check whether snapshot file exist
if (zk.existSnapshot()) {
snapshotNeeded = false;
}
}
{code}
was (Author: doudou):
[~hanm] , yes, we can disable check snapshot during upgrade, but we should't always disable it, that means we need to modify configuration again while upgrade completed. so i think we can do this as follow:
{code:java}
// code placeholder
if (qp.getType() == Leader.DIFF) {
LOG.info("Getting a diff from the leader 0x{}", Long.toHexString(qp.getZxid()));
//add check whether snapshot file exist
snapshotNeeded = false;
}
{code}
> Zookeeper will not sync snapshot while get DIFF and cause start failed.
> -----------------------------------------------------------------------
>
> Key: ZOOKEEPER-4005
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4005
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.5.1, 3.5.6
> Reporter: pengWei Dou
> Priority: Major
> Attachments: zookeeper-server.log
>
>
> The version 3.5.1 of ZK does not detect whether the snapshot file exists or not. However, the snapshot file detection is added in the subsequent version. When I tested the upgrade from 3.5.1 to 3.5.6, I found that after the completion of ZK election, One of the ZK node has an error in the following phase due to some network reasons, and then it will receive a diff reply. At this time, both snapshotNeeded and isPreZAB1_0 ( Learner#syncWithLeader(long newLeaderZxid) )are assigned to false. So, none of snapshot file will be generated but a log file, which will cause the startup failure after the upgrade.
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)