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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.3.5
    • None
    • server
    • 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.

      Attachments

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

        Activity

          People

            bbridge Bill Bridge
            bbridge Bill Bridge
            Votes:
            1 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