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


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java:
##########
@@ -382,15 +379,25 @@ protected void requestCompactionInternal(HRegion region, 
HStore store, String wh
       // pool; we will do selection there, and move to large pool if necessary.
       pool = shortCompactions;
     }
-    pool.execute(
-      new CompactionRunner(store, region, compaction, tracker, 
completeTracker, pool, user));
-    if (LOG.isDebugEnabled()) {
-      LOG.debug(
-        "Add compact mark for store {}, priority={}, current under compaction "
-          + "store size is {}",
-        getStoreNameForUnderCompaction(store), priority, 
underCompactionStores.size());
-    }
+
+    // A simple implementation for under compaction marks.
+    // Since this method is always called in the synchronized methods, we do 
not need to use the
+    // boolean result to make sure that exactly the one that added here will 
be removed
+    // in the next steps.
     underCompactionStores.add(getStoreNameForUnderCompaction(store));
+    try {
+      pool.execute(
+        new CompactionRunner(store, region, compaction, tracker, 
completeTracker, pool, user));
+      if (LOG.isDebugEnabled()) {
+        LOG.debug(
+          "Add compact mark for store {}, priority={}, current under 
compaction "
+            + "store size is {}",
+          getStoreNameForUnderCompaction(store), priority, 
underCompactionStores.size());
+      }
+    } catch (Throwable t) {

Review Comment:
   When will we get exceptions here? And better just catch the exception types 
which could be thrown in the above code block?



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