CCweixiao commented on code in PR #5589:
URL: https://github.com/apache/hbase/pull/5589#discussion_r1446790652


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/StripeCompactionPolicy.java:
##########
@@ -125,6 +125,21 @@ public StripeCompactionRequest 
selectCompaction(StripeInformationProvider si,
       return request;
     }
 
+    if (forceMajor && isUserCompaction) {
+      if (allFiles == null || allFiles.isEmpty()) {
+        LOG.debug("There is no store file to force a major compaction.");
+        return null;
+      }
+      LOG.debug("The user enforces a major compaction; compacting all files");
+      long targetKvs = estimateTargetKvs(allFiles, 
config.getInitialCount()).getFirst();
+      SplitStripeCompactionRequest request =

Review Comment:
   Yes, if it is a user-triggered forced marjor compact, it will perform the 
compact of all files in the entire region, and for periodic major compact, it 
will select a certain Stripe to compact



-- 
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