You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/06/27 08:42:54 UTC

[GitHub] [hbase] sbarnoud commented on a change in pull request #343: HBASE-22634 : Improve performance of BufferedMutator

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

 ##########
 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:
   At least in my environment:
   
   ```
   2019-04-02 12:04:47,726 WARN  [Executor task launch worker for task 23] AsyncProcess:1004  - #8, the task was rejected by the pool. This is unexpected. Server is XXXXXX.fr.world.socgen,16020,1552142849868
   java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@6eb15d4f rejected from java.util.concurrent.ThreadPoolExecutor@73168fb9[Running, pool size = 128, active threads = 128, queued tasks = 0, completed tasks = 182]
               at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)
               at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
               at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369 
   ``` 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services