Description
_emphasized text_After upgrading from zookeeper 3.4.5, to 3.4.11, without editing zoo.cfg, the new version of the server tries to use the dataDir as the dataLogDir, and the dataLogDir as the dataDir. Or at least some parts of the server.
Configuration file has:
$ grep -i data /etc/zookeeper/zoo.cfg dataLogDir=/var/lib/zookeeper/datalog dataDir=/var/lib/zookeeper/data
But runtime configuration has:
$ echo conf | nc localhost 2181 | grep -i data dataDir=/var/lib/zookeeper/datalog/version-2 dataLogDir=/var/lib/zookeeper/data/version-2
Also, I got this in the debug logs, so clearly some parts of the server confuse things.
[PurgeTask:FileTxnSnapLog@79] - Opening datadir:/var/lib/zookeeper/datalog snapDir:/var/lib/zookeeper/data [main:FileTxnSnapLog@79] - Opening datadir:/var/lib/zookeeper/data snapDir:/var/lib/zookeeper/datalog
I tried to look in the code for wrong uses of the directories. I only found ZookeeperServer.java is passing the arguments to FileTxnSnapLog in the wrong order, but the code comment says that this is legacy only for tests, so I assume it isn't the cause for my case.