Description
See https://github.com/samuel/go-zookeeper/issues/62
I've reproduced this on 3.4.5 with the code:
c, _, _ := zk.Connect([]string
, time.Second)
c.Set("", []byte{}, 0)
This crashes a local zookeeper 3.4.5 server:
2015-06-10 16:21:10,862 [myid:] - ERROR [SyncThread:0:SyncRequestProcessor@151] - Severe unrecoverable error, exiting
java.lang.IllegalArgumentException: Invalid path
at org.apache.zookeeper.common.PathTrie.findMaxPrefix(PathTrie.java:259)
at org.apache.zookeeper.server.DataTree.getMaxPrefixWithQuota(DataTree.java:634)
at org.apache.zookeeper.server.DataTree.setData(DataTree.java:616)
at org.apache.zookeeper.server.DataTree.processTxn(DataTree.java:807)
at org.apache.zookeeper.server.ZKDatabase.processTxn(ZKDatabase.java:329)
at org.apache.zookeeper.server.ZooKeeperServer.processTxn(ZooKeeperServer.java:965)
at org.apache.zookeeper.server.FinalRequestProcessor.processRequest(FinalRequestProcessor.java:116)
at org.apache.zookeeper.server.SyncRequestProcessor.flush(SyncRequestProcessor.java:167)
at org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:101)
On restart the zookeeper server crashes out:
2015-06-10 16:22:21,352 [myid:] - ERROR [main:ZooKeeperServerMain@54] - Invalid arguments, exiting abnormally
java.lang.IllegalArgumentException: Invalid path
at org.apache.zookeeper.common.PathTrie.findMaxPrefix(PathTrie.java:259)
at org.apache.zookeeper.server.DataTree.getMaxPrefixWithQuota(DataTree.java:634)
at org.apache.zookeeper.server.DataTree.setData(DataTree.java:616)
at org.apache.zookeeper.server.DataTree.processTxn(DataTree.java:807)
at org.apache.zookeeper.server.persistence.FileTxnSnapLog.processTransaction(FileTxnSnapLog.java:198)
at org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:151)
at org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:223)
at org.apache.zookeeper.server.ZooKeeperServer.loadData(ZooKeeperServer.java:250)
at org.apache.zookeeper.server.ZooKeeperServer.startdata(ZooKeeperServer.java:377)
at org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:122)
at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:112)
at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:86)
at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:52)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:116)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)