comnetwork commented on code in PR #4768:
URL: https://github.com/apache/hbase/pull/4768#discussion_r965505984
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java:
##########
@@ -315,11 +315,13 @@ public void switchCompaction(boolean onOrOff) {
LOG.info("Re-Initializing compactions because user switched on
compactions");
reInitializeCompactionsExecutors();
}
- } else {
- LOG.info("Interrupting running compactions because user switched off
compactions");
- interrupt();
+ setCompactionsEnabled(onOrOff);
Review Comment:
Oh, here I think it is not just a style change, for disable compaction, I
think the order we would better to set the flag first and then shut down the
thread pool, in the reverse order of operations when compaction is enabled.
--
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]