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

compaction marker could be skipped

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • Compaction, regionserver
    • None

    Description

      The sequence for a compaction are as follows:
      1. Compaction writes new files under region/.tmp directory (compaction output)
      2. Compaction atomically moves the temporary file under region directory
      3. Compaction appends a WAL edit containing the compaction input and output files. Forces sync on WAL.
      4. Compaction deletes the input files from the region directory.

      But if a flush happened between 3 and 4, then the regionserver crushed. The compaction marker will be skipped when splitting log because the sequence id of compaction marker is smaller than lastFlushedSequenceId.

              if (lastFlushedSequenceId >= entry.getKey().getLogSeqNum()) {
                editsSkipped++;
                continue;
              }
      

      Attachments

        1. TestCompactionMarker.java
          13 kB
          Jingyun Tian
        2. HBASE-18128-master-v3.patch
          15 kB
          Jingyun Tian
        3. HBASE-18128-master-v2.patch
          15 kB
          Jingyun Tian
        4. HBASE-18128-master.patch
          1 kB
          Jingyun Tian

        Activity

          People

            tianjingyun Jingyun Tian
            tianjingyun Jingyun Tian
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: