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

Sometimes some compacted storefiles are still opened after region failover

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha-1, 1.3.0, 1.4.0, 1.5.0, 2.0.0
    • Fix Version/s: 3.0.0-alpha-1, 2.2.0, 2.3.0
    • Component/s: None
    • Labels:
      None
    • Release Note:
      Hide
      Problem: This is an old problem since HBASE-2231. The compaction event marker was only writed to WAL. But after flush, the WAL may be archived, which means an useful compaction event marker be deleted, too. So the compacted store files cannot be archived when region open and replay WAL.

      Solution: After this jira, the compaction event tracker will be writed to HFile. When region open and load store files, read the compaction evnet tracker from HFile and archive the compacted store files which still exist.
      Show
      Problem: This is an old problem since HBASE-2231 . The compaction event marker was only writed to WAL. But after flush, the WAL may be archived, which means an useful compaction event marker be deleted, too. So the compacted store files cannot be archived when region open and replay WAL. Solution: After this jira, the compaction event tracker will be writed to HFile. When region open and load store files, read the compaction evnet tracker from HFile and archive the compacted store files which still exist.

      Description

      It is important that compacted storefiles of a given compaction execution are wholly opened or archived to insure data consistency. ie a storefile containing delete tombstones can be archived while older storefiles containing cells that were supposed to be deleted are left unarchived thereby undeleting those cells.

      When a server fails compaction markers (in the wal edit) are used to determine which storefiles are compacted and should be excluded during region open (during failover). But the WALs containing compaction markers can be prematurely archived even though there are still compacted storefiles for that particular compaction event that hasn't been archived yet. Thus losing compaction information that needs to be replayed in the event of an RS crash. This is because hlog archiving logic only keeps track of flushed storefiles and not compacted ones.

      https://issues.apache.org/jira/browse/HBASE-20704?focusedCommentId=16507680&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16507680

        Attachments

        1. HBASE-20724.master.001.patch
          8 kB
          Guanghao Zhang
        2. HBASE-20724.master.002.patch
          19 kB
          Guanghao Zhang
        3. HBASE-20724.master.003.patch
          22 kB
          Guanghao Zhang
        4. HBASE-20724.master.004.patch
          40 kB
          Guanghao Zhang
        5. HBASE-20724.master.005.patch
          43 kB
          Guanghao Zhang
        6. HBASE-20724.master.006.patch
          45 kB
          Guanghao Zhang
        7. HBASE-20724.master.007.patch
          44 kB
          Guanghao Zhang
        8. HBASE-20724.master.008.patch
          43 kB
          Guanghao Zhang
        9. HBASE-20724.master.009.patch
          45 kB
          Guanghao Zhang
        10. HBASE-20724.master.010.patch
          50 kB
          Guanghao Zhang
        11. HBASE-20724.master.011.patch
          53 kB
          Guanghao Zhang
        12. HBASE-20724.master.012.patch
          54 kB
          Guanghao Zhang
        13. HBASE-20724.master.013.patch
          53 kB
          Guanghao Zhang
        14. HBASE-20724.master.013.patch
          53 kB
          Guanghao Zhang
        15. HBASE-20724.master.014.patch
          53 kB
          Guanghao Zhang
        16. HBASE-20724.branch-2.001.patch
          51 kB
          Guanghao Zhang

          Issue Links

            Activity

              People

              • Assignee:
                zghao Guanghao Zhang
                Reporter:
                toffer Francis Christopher Liu
              • Votes:
                0 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: