[ https://issues.apache.org/jira/browse/ZOOKEEPER-4416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
May updated ZOOKEEPER-4416: --------------------------- Description: There is a ZooKeeper cluster with three nodes: zk1, zk2 and zk3. 1. zk1 was stopped for a while; 2. restart zk1, and it starts to follow the current leader; 3. zk1 creates the {{currentEpoch.tmp}} file; 4. zk1 crashes before writing current epoch to {{currentEpoch.tmp}} file; 5. restart zk1, and it fails due to "Unable to load database on disk" error: {code:java} java.io.IOException: Found null in /home/zk-3.6.3/zkData/version-2/currentEpoch.tmp at java.lang.Throwable.fillInStackTrace(Throwable.java) at java.lang.Throwable.fillInStackTrace(Throwable.java:784) at java.lang.Throwable.<init>(Throwable.java:266) at java.lang.Exception.<init>(Exception.java:66) at java.io.IOException.<init>(IOException.java:58) at org.apache.zookeeper.server.quorum.QuorumPeer.readLongFromFile(QuorumPeer.java:2116) at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:1118) at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:1079) at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:227) at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:136) at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:90) {code} was: There is a ZooKeeper cluster with three nodes: zk1, zk2 and zk3. 1. zk1 was stopped for a while; 2. restart zk1, and it starts to follow the current leader; 3. zk1 creates the > Null currentEpoch.tmp fails the server > -------------------------------------- > > Key: ZOOKEEPER-4416 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4416 > Project: ZooKeeper > Issue Type: Bug > Affects Versions: 3.6.3 > Reporter: May > Priority: Major > > There is a ZooKeeper cluster with three nodes: zk1, zk2 and zk3. > 1. zk1 was stopped for a while; > 2. restart zk1, and it starts to follow the current leader; > 3. zk1 creates the {{currentEpoch.tmp}} file; > 4. zk1 crashes before writing current epoch to {{currentEpoch.tmp}} file; > 5. restart zk1, and it fails due to "Unable to load database on disk" error: > {code:java} > java.io.IOException: Found null in > /home/zk-3.6.3/zkData/version-2/currentEpoch.tmp > at java.lang.Throwable.fillInStackTrace(Throwable.java) > at java.lang.Throwable.fillInStackTrace(Throwable.java:784) > at java.lang.Throwable.<init>(Throwable.java:266) > at java.lang.Exception.<init>(Exception.java:66) > at java.io.IOException.<init>(IOException.java:58) > at > org.apache.zookeeper.server.quorum.QuorumPeer.readLongFromFile(QuorumPeer.java:2116) > at > org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:1118) > at > org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:1079) > at > org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:227) > at > org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:136) > at > org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:90) > {code} -- This message was sent by Atlassian Jira (v8.20.1#820001)