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

Log truncation truncating log too much - can cause data loss

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.3.3
    • 3.3.4, 3.4.0
    • quorum, server
    • None

    Description

      The log truncation relies on position calculation for a particular zxid to figure out the new size of the log file. There is a bug in PositionInputStream implementation which skips counting the bytes in the log which have value 0. This can lead to underestimating the actual log size. The log records which should be there can get truncated, leading to data loss on the participant which is executing the trunc.

      Clients can see different values depending on whether they connect to the node on which trunc was executed.

      Attachments

        1. ZOOKEEPER-1156.patch
          2 kB
          Vishal Kathuria

        Activity

          People

            vishal.k Vishal Kathuria
            vishal.k Vishal Kathuria
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified