1. HBase
  2. HBASE-3048

unify code for major/minor compactions


    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.90.0
    • Component/s: None
    • Labels:
    • Hadoop Flags:
    • Release Note:
      minor compactions now enforce ttl, maxversions, deletes, etc... but will let through the delete markers themselves


      Today minor compactions do not process deletes, purge old versions, etc. Only major compactions do. The rationale was probably to save CPU . We should evaluate if major compaction logic indeed runs significantly slower.

      Unifying minor compactions to do the same thing as major compactions has other advantages:

      • If the same keys are deleted/updated repeatedly, the fact that deletes/overwrites are not processed during minor compaction makes each subsequent minor compaction more expensive as the total amount of data keeps growing.
      • We'll have fewer bugs if the logic is as symmetric as possible. Any bugs in TTL enforcement, version enforcement, etc. could cause behavior to be different after a major compaction. Keeping the same logic means these bugs will get caught earlier.


      Note: There will still need to be one difference in the two schemes, and that has to do with delete markers. Any compaction which doesn't compact all files will still need to leave delete markers.

      1. unify.patch
        19 kB
        Amitanand Aiyer
      2. HBASE-3048-0.90-v2.patch
        31 kB
        Jonathan Gray
      3. HBASE-3048-v3.patch
        32 kB
        Jonathan Gray


        No work has yet been logged on this issue.


          • Assignee:
            Amitanand Aiyer
            Kannan Muthukkaruppan
          • Votes:
            0 Vote for this issue
            5 Start watching this issue


            • Created: