HBASE-30398 Support configuring the concurrency of off-peak compactions - #8669
Open
Huginn-kio wants to merge 1 commit into
Open
Huginn-kio wants to merge 1 commit into
Huginn-kio wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HBASE-30398
HBASE-30398 tracks the issue described below.
Summary
HBase currently allows only one off-peak compaction at a time within a RegionServer. This is
enforced by a single
AtomicBooleanshared by all stores, so compaction capacity is underutilizedon systems with enough resources.
Root cause
HStoreuses oneAtomicBooleanfor off-peak compaction admission. A store can enter the off-peakpath only when it changes the flag from
falsetotrue; the flag is cleared after selectionfails or the compaction finishes. As a result, all stores contend for one permit.
Fix
hbase.hstore.offpeak.compaction.concurrency, defaulting to1, to control the number ofconcurrent off-peak compactions.
configuration changes.
Testing
mvn -pl hbase-server -am -Dtest=TestOffPeakCompactionTracker -Dsurefire.failIfNoSpecifiedTests=false -DskipITs testmvn -pl hbase-server -am -Dtest=TestOffPeakCompactionTracker,TestOffPeakHours,TestCurrentHourProvider,TestCloseChecker -Dsurefire.failIfNoSpecifiedTests=false -DskipITs testmvn -pl hbase-server -am -DskipTests packagemvn -pl hbase-server -DskipTests checkstyle:check -Dcheckstyle.includes='**/OffPeakCompactionTracker.java,**/TestOffPeakCompactionTracker.java'mvn -pl hbase-server -DskipTests apache-rat:check spotbugs:checkThe focused tests passed with 2 tests and the adjacent regression slice passed with 7 tests.
Compatibility
The setting is optional and defaults to
1, preserving the current behavior. This change does notalter public APIs, wire formats, or persisted state.