sbarnoud commented on a change in pull request #343: HBASE-22634 : Improve 
performance of BufferedMutator       
URL: https://github.com/apache/hbase/pull/343#discussion_r298078540
 
 

 ##########
 File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
 ##########
 @@ -543,22 +572,36 @@ void sendMultiAction(Map<ServerName, MultiAction> 
actionsByServer,
             && numAttempt % HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER != 
0) {
           runnable.run();
         } else {
-          try {
-            pool.submit(runnable);
-          } catch (Throwable t) {
-            if (t instanceof RejectedExecutionException) {
-              // This should never happen. But as the pool is provided by the 
end user,
-              // let's secure this a little.
-              LOG.warn("id=" + asyncProcess.id + ", task rejected by pool. 
Unexpected." +
-                  " Server=" + server.getServerName(), t);
-            } else {
-              // see #HBASE-14359 for more details
-              LOG.warn("Caught unexpected exception/error: ", t);
+          boolean completed = false;
+          int nbTry = 0;
+          while(!completed) {
+            try {
+              ++nbTry;
+              pool.submit(runnable);
+              completed = true;
+            } catch (Throwable t) {
+              if (t instanceof RejectedExecutionException) {
 
 Review comment:
   That's because a slot is freed within the executor thread, and on heavy load 
on a 32 cores machine, the slot may be reused before the thread is back to the 
pool.

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


With regards,
Apache Git Services

Reply via email to