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 (#5273)

Signed-off-by: Duo Zhang <[email protected]>
Signed-off-by: Wellington Chevreuil <[email protected]>
(cherry picked from commit d1f29d0)
  • Loading branch information
guluo2016 authored and Apache9 committed Jul 6, 2023
1 parent 46368c9 commit 94f8424
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,9 @@ private static class CompactionChecker extends ScheduledChore {
@Override
protected void chore() {
for (Region r : this.instance.onlineRegions.values()) {
if (r == null) {
// 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;
}
HRegion hr = (HRegion) r;
Expand Down

0 comments on commit 94f8424

Please sign in to comment.