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 <zhangduo@apache.org>
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
(cherry picked from commit d1f29d0)
  • Loading branch information
guluo2016 authored and Apache9 committed Jul 6, 2023
1 parent 7640557 commit c4a1b44
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1956,7 +1956,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 c4a1b44

Please sign in to comment.