saintstack commented on a change in pull request #2413:
URL: https://github.com/apache/hbase/pull/2413#discussion_r490412548



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
##########
@@ -2451,8 +2448,23 @@ private void triggerFlushInPrimaryRegion(final HRegion 
region) {
 
     // submit it to be handled by one of the handlers so that we do not block 
OpenRegionHandler
     if (this.executorService != null) {
-      this.executorService.submit(new RegionReplicaFlushHandler(this, 
clusterConnection,
-          rpcRetryingCallerFactory, rpcControllerFactory, operationTimeout, 
region));
+      EventHandler eh = new RegionReplicaFlushHandler(this, clusterConnection,
+        rpcRetryingCallerFactory, rpcControllerFactory, operationTimeout, 
region);
+      if (this.executorService.hasExecutor(eh.getEventType())) {
+        this.executorService.submit(eh);
+      } else {
+        // There is no executor for this type of event. Run in a new thread.

Review comment:
       Its one-off task on one RS in the cluster only give or take an 
hbase:meta move. Didn't make sense to me reserving an executor on all servers.  
I can add. Need to fix executorservice so it can exist w/o a core thread.... 
currently spins up whatever the max threads count is... 




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

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


Reply via email to