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

Flush is skipped after log replay if the last recovered edits file is skipped

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 0.98.1, 0.99.0, 0.96.3
    • None
    • None
    • Reviewed

    Description

      We caught this in an extended test run where IntegrationTestBigLinkedList failed with some missing keys.

      The problem is that HRegion.replayRecoveredEdits() would return -1 if all the edits in the log file is skipped, which is true for example if the log file only contains a single compaction record (HBASE-2231) or somehow the edits cannot be applied (column family deleted, etc).

      The callee, HRegion.replayRecoveredEditsIfAny() only looks for the last returned seqId to decide whether a flush is necessary or not before opening the region, and discarding replayed recovered edits files.

      Therefore, if the last recovered edits file is skipped but some edits from earlier recovered edits files are applied, the mandatory flush before opening the region is skipped. If the region server dies after this point before a flush, the edits are lost.

      This is important to fix, though the sequence of events are super rare for a production cluster.

      Attachments

        1. hbase-10829_v3.patch
          6 kB
          Enis Soztutar
        2. hbase-10829_v2.patch
          5 kB
          Enis Soztutar
        3. hbase-10829_v1.patch
          5 kB
          Enis Soztutar

        Activity

          People

            enis Enis Soztutar
            enis Enis Soztutar
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: