Huginn-kio opened a new pull request, #8669:
URL: https://github.com/apache/hbase/pull/8669

   ## HBASE-27861
   
   [HBASE-27861](https://issues.apache.org/jira/browse/HBASE-27861) 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 `AtomicBoolean` shared by all stores, so compaction 
capacity is underutilized
   on systems with enough resources.
   
   ### Root cause
   
   `HStore` uses one `AtomicBoolean` for off-peak compaction admission. A store 
can enter the off-peak
   path only when it changes the flag from `false` to `true`; the flag is 
cleared after selection
   fails or the compaction finishes. As a result, all stores contend for one 
permit.
   
   ### Fix
   
   * Replace the single boolean gate with a shared semaphore-backed tracker.
   * Add `hbase.hstore.offpeak.compaction.concurrency`, defaulting to `1`, to 
control the number of
     concurrent off-peak compactions.
   * Register the tracker with configuration observers so the permit count 
follows runtime
     configuration changes.
   * Add unit coverage for the configured concurrency and updates to the 
setting.
   
   ### Testing
   
   * `mvn -pl hbase-server -am -Dtest=TestOffPeakCompactionTracker 
-Dsurefire.failIfNoSpecifiedTests=false -DskipITs test`
   * `mvn -pl hbase-server -am 
-Dtest=TestOffPeakCompactionTracker,TestOffPeakHours,TestCurrentHourProvider,TestCloseChecker
 -Dsurefire.failIfNoSpecifiedTests=false -DskipITs test`
   * `mvn -pl hbase-server -am -DskipTests package`
   * `mvn -pl hbase-server -DskipTests checkstyle:check 
-Dcheckstyle.includes='**/OffPeakCompactionTracker.java,**/TestOffPeakCompactionTracker.java'`
   * `mvn -pl hbase-server -DskipTests apache-rat:check spotbugs:check`
   
   The 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 not
   alter public APIs, wire formats, or persisted state.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to