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

users cannot migrate from 3.4->3.3->3.4 server code against a single datadir

    Details

    • Type: Task
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.4.0, 3.5.0
    • Fix Version/s: 3.4.0, 3.5.0
    • Component/s: server
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change
    • Release Note:
      Hide
      The ZooKeeper server cannot be migrated from version 3.4 to version 3.3 and then back to version 3.4 without user intervention.

      Upgrading from 3.3 to 3.4 is supported as is downgrading from 3.4 to 3.3. However moving from 3.4 to 3.3 and back to 3.4 will fail. 3.4 is checking the datadir for "acceptedEpoch" and "currentEpoch" files and comparing these against the snapshot and log files contained in the same directory. These epoch files are new in 3.4.

      As a result:
      1) upgrading from 3.3 to 3.4 is fine - the files don't exist, the server creates them
      2) downgrading from 3.4 to 3.3 - this is also fine as version 3.3 ignores these files
      3) however, 3.4->3.3->3.4 fails because 3.4 will see invalid *Epoch files in the datadir (as 3.3 would have ignored them, applying changes to snap/log w/o updating them)

      A workaround for this problem is to delete the epoch files if this situation occurrs - the version 3.4 server will create them similar to case 1) above.
      Show
      The ZooKeeper server cannot be migrated from version 3.4 to version 3.3 and then back to version 3.4 without user intervention. Upgrading from 3.3 to 3.4 is supported as is downgrading from 3.4 to 3.3. However moving from 3.4 to 3.3 and back to 3.4 will fail. 3.4 is checking the datadir for "acceptedEpoch" and "currentEpoch" files and comparing these against the snapshot and log files contained in the same directory. These epoch files are new in 3.4. As a result: 1) upgrading from 3.3 to 3.4 is fine - the files don't exist, the server creates them 2) downgrading from 3.4 to 3.3 - this is also fine as version 3.3 ignores these files 3) however, 3.4->3.3->3.4 fails because 3.4 will see invalid *Epoch files in the datadir (as 3.3 would have ignored them, applying changes to snap/log w/o updating them) A workaround for this problem is to delete the epoch files if this situation occurrs - the version 3.4 server will create them similar to case 1) above.

      Description

      3.4 is checking acceptedEpoch/currentEpoch files against the snap/log files in datadir. These files are new in 3.4. If they don't exist the server will create them, however if they do exist the server will validate them.

      As a result if a user
      1) upgrades from 3.3 to 3.4 this is fine
      2) downgrades from 3.4 to 3.3 this is also fine (3.3 ignores these files)
      3) however, 3.4->3.3->3.4 fails because 3.4 will see invalid *Epoch files in the datadir (as 3.3 would have ignored them, applying changes to snap/log w/o updating them)

        Attachments

          Activity

            People

            • Assignee:
              phunt Patrick Hunt
              Reporter:
              phunt Patrick Hunt
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: