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

Autopurge deletes log file prior to oldest retained snapshot even though restore may need it

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • server
    • None

    Description

      Autopurge retains all log files whose zxid are >= the zxid of the oldest snapshot file that it is going to retain (in PurgeTxnLog retainNRecentSnapshots()). However, unless there is a log file with the same zxid as the oldest snapshot file being retained (and whether log file and snapshot file zxids are equal is timing dependent), loading the database from snapshots/logs will start with the log file prior to the snapshot's zxid. Thus, to avoid data loss autopurge should retain the log file prior to the oldest retained snapshot as well, unless it verifies that it contains no zxids beyond what the snapshot contains or there is a log file whose zxid == snapshot zxid.

      Attachments

        1. ZOOKEEPER-2420.patch
          9 kB
          Ed Rowe
        2. ZOOKEEPER-2420.patch_v2
          14 kB
          Ed Rowe
        3. ZOOKEEPER-2420.patch_v3
          16 kB
          Ed Rowe

        Issue Links

          Activity

            People

              EdRowe Ed Rowe
              EdRowe Ed Rowe
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: