Skip to content

Commit

Permalink
HBASE-27920 Skipping compact for this region if the table disable com…
Browse files Browse the repository at this point in the history
…paction (apache#5273)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
  • Loading branch information
guluo2016 committed Jul 6, 2023
1 parent 2ca012f commit d1f29d0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1638,8 +1638,9 @@ private static class CompactionChecker extends ScheduledChore {
@Override
protected void chore() {
for (Region r : this.instance.onlineRegions.values()) {
// Skip compaction if region is read only
if (r == null || r.isReadOnly()) {
// If region is read only or compaction is disabled at table level, there's no need to
// iterate through region's stores
if (r == null || r.isReadOnly() || !r.getTableDescriptor().isCompactionEnabled()) {
continue;
}

Expand Down

0 comments on commit d1f29d0

Please sign in to comment.