Hi zookeeper team,
We hit an issue when upgrading from 3.4.x to 3.5.4-beta. Need some helps/advices from the community. ``` *10:14:55.607 [main] INFO org.apache.zookeeper.server.NIOServerCnxnFactory - binding to port 0.0.0.0/0.0.0.0:2181 <http://0.0.0.0/0.0.0.0:2181>* *10:14:55.623 [main] ERROR org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble - Exception while instantiating ZooKeeper* *java.io.IOException: No snapshot found, but there are log entries. Something is broken!* * at org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:206) ~[pulsar-broker.jar:2.1.0-incubating-SNAPSHOT]* * at org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:240) ~[pulsar-broker.jar:2.1.0-incubating-SNAPSHOT]* * at org.apache.zookeeper.server.ZooKeeperServer.loadData(ZooKeeperServer.java:284) ~[pulsar-broker.jar:2.1.0-incubating-SNAPSHOT]* * at org.apache.zookeeper.server.ZooKeeperServer.startdata(ZooKeeperServer.java:444) ~[pulsar-broker.jar:2.1.0-incubating-SNAPSHOT]* * at org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:764) ~[pulsar-broker.jar:2.1.0-incubating-SNAPSHOT]* * at org.apache.zookeeper.server.ServerCnxnFactory.startup(ServerCnxnFactory.java:98) ~[pulsar-broker.jar:2.1.0-incubating-SNAPSHOT]* * at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.runZookeeper(LocalBookkeeperEnsemble.java:126) [pulsar-zookeeper-utils.jar:2.1.0-incubating-SNAPSHOT]* * at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.startStandalone(LocalBookkeeperEnsemble.java:242) [pulsar-zookeeper-utils.jar:2.1.0-incubating-SNAPSHOT]* * at org.apache.pulsar.PulsarStandaloneStarter.start(PulsarStandaloneStarter.java:171) [pulsar-broker.jar:2.1.0-incubating-SNAPSHOT]* * at org.apache.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:266) [pulsar-broker.jar:2.1.0-incubating-SNAPSHOT]* ``` Looking into the source code, https://github.com/apache/zookeeper/blob/release-3.5.4/src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java#L206 A fix was introduced in https://issues.apache.org/jira/browse/ZOOKEEPER-2325 to throw exception when there is no snapshots and txn log is not empty. I am just curious why the change was made in such way. my feeling in a snapshotting-based store, if there is no snapshots but there are log entries, it usually doesn't mean the state was corrupted. I guess I might miss some context behind ZOOKEEPER-2325. Also can you advice the steps for people who using 3.4.x to upgrade to 3.5.4-beta? Thanks, Sijie