ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1520

A txn log record with a corrupt sentinel byte looks like EOF

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.3.5
    • Fix Version/s: 3.5.2, 3.6.0
    • Component/s: server
    • Labels:
    • Environment:

      all

      Description

      In Util.readTxnBytes() the sentinel is compared with 0x42 and if it does not match then the record is considered partially written and thus the EOF. However if it is a partial record the sentinel should be 0x00 since that is what the log is initialized with. Any other value would indicate corruption and should throw an IOException rather than indicate EOF. See ZOOKEEPER-1453 for a related issue.

      1. ZOOKEEPER-1520.patch
        11 kB
        Bill Bridge
      2. init.out
        0.4 kB
        Bill Bridge
      3. init.out
        0.4 kB
        Bill Bridge
      4. checkout.out
        85 kB
        Bill Bridge
      5. ant.out
        24 kB
        Bill Bridge

        Activity

          People

          • Assignee:
            Bill Bridge
            Reporter:
            Bill Bridge
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

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

                Development