You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/09/08 01:50:03 UTC

[GitHub] [hbase] Apache9 commented on a diff in pull request #4768: HBASE-27362 CompactSplit.requestCompactionInternal may bypass compact…

Apache9 commented on code in PR #4768:
URL: https://github.com/apache/hbase/pull/4768#discussion_r965430443


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java:
##########
@@ -229,8 +229,10 @@ private synchronized void requestSplit(final Region r, byte[] midKey) {
    */
   private synchronized void requestSplit(final Region r, byte[] midKey, User user) {
     if (midKey == null) {
-      LOG.debug("Region " + r.getRegionInfo().getRegionNameAsString()
-        + " not splittable because midkey=null");
+      if (LOG.isDebugEnabled()) {

Review Comment:
   Are these logging changes related?



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java:
##########
@@ -336,6 +346,13 @@ private void requestCompactionInternal(HRegion region, String why, int priority,
   protected void requestCompactionInternal(HRegion region, HStore store, String why, int priority,
     boolean selectNow, CompactionLifeCycleTracker tracker,
     CompactionCompleteTracker completeTracker, User user) throws IOException {
+    if (!this.isCompactionsEnabled()) {

Review Comment:
   So this is the actual fix?



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java:
##########
@@ -312,14 +316,20 @@ public void switchCompaction(boolean onOrOff) {
     if (onOrOff) {
       // re-create executor pool if compactions are disabled.
       if (!isCompactionsEnabled()) {
-        LOG.info("Re-Initializing compactions because user switched on compactions");
+        if (LOG.isInfoEnabled()) {

Review Comment:
   I prefer we keep the old style.



-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org