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

PurgeTxnLog may delete data logs during roll

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.4.5
    • Fix Version/s: 3.4.7, 3.5.0
    • Component/s: server
    • Labels:
      None

      Description

      org.apache.zookeeper.server.PurgeTxnLog deletes old data logs and snapshots, keeping the newest N snapshots and any data logs that have been written since the snapshot.

      It does this by listing the available snapshots & logs and creates a blacklist of snapshots and logs that should not be deleted. Then, it searches for and deletes all logs and snapshots that are not in this list.

      It appears that if logs are rolling or a new snapshot is created during this process, then these newer files will be unintentionally deleted.

        Attachments

        1. ZOOKEEPER-1797.patch
          9 kB
          Rakesh R
        2. ZOOKEEPER-1797.patch
          9 kB
          Rakesh R
        3. ZOOKEEPER-1797.patch
          9 kB
          Rakesh R
        4. ZOOKEEPER-1797.patch
          23 kB
          Rakesh R

          Issue Links

            Activity

              People

              • Assignee:
                rakeshr Rakesh R
                Reporter:
                dagit Derek Dagit
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: