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



##########
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:
       Hmm.. I can remove this all. The handler for this stuff shoudl be there 
whether meta or user-space region replica. Thanks.




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