You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2021/03/25 18:21:29 UTC

[GitHub] [zookeeper] arshadmohammad commented on a change in pull request #1109: ZOOKEEPER-2354. zookeeper fails to start because of inconsistent epoch

arshadmohammad commented on a change in pull request #1109:
URL: https://github.com/apache/zookeeper/pull/1109#discussion_r601738702



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java
##########
@@ -1032,6 +1035,17 @@ private void loadDataBase() {
             long epochOfZxid = ZxidUtils.getEpochFromZxid(lastProcessedZxid);
             try {
                 currentEpoch = readLongFromFile(CURRENT_EPOCH_FILENAME);
+                if (epochOfZxid > currentEpoch && updating.exists()) {
+                    LOG.info("{} found. The server was terminated after "
+                                    + "taking a snapshot but before updating current "

Review comment:
       IMHO, skip creating update file will not cause any problem. old update file will be just reused. it is a flag, does not contain any value in it. Its effect is same as newly created update file. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org