Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-2960

The dataDir and dataLogDir are used opposingly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 3.4.11
    • 3.4.12
    • server
    • None
    • Not relevant.

    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.

      Attachments

        Activity

          People

            andor Andor Molnar
            danmilon Dan Milon
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: