Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16624

MVCC DeSerialization bug in the HFileScannerImpl

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: HFile
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      My colleague Nitin Aggarwal found a bug in the deserialization of mvcc from HFile, As a part of the optimization of deserialization of VLong, we read a int at once but we forgot to convert it to unsigned one.

      This would cause issues because once we cross the integer threshold in sequenceId and a compaction happens we would write MAX_MEMSTORE_TS in the trailer as 0 (because we will be reading negative values from the file that got flushed with sequenceId > Integer.MAX_VALUE). And once we have MAX_MEMSTORE_TS as 0, and there are sequenceId values present alongside with KeyValues the regionserver will now start failing to read the compacted file and thus corruption.

      Interestingly this would happen only on the tables that don't have DataBlockEncoding enabled and unfortunately in our case that turned out to be META and a another small table.

      Fix is small (~20 chars) and attached

        Attachments

        1. HBASE-16624.patch
          1 kB
          deepankar

          Activity

            People

            • Assignee:
              dvdreddy deepankar
              Reporter:
              dvdreddy deepankar
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: