hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [1/6] hbase git commit: HBASE-14359 HTable#close will hang forever if unchecked error/exception thrown in AsyncProcess#sendMultiAction (Victor Xu)
Date Fri, 04 Sep 2015 01:38:26 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 86d39a3ab -> 3e68b1e99
  refs/heads/branch-1 8a4aee608 -> 513b37603
  refs/heads/branch-1.0 9b3e4bc89 -> 0564bfc81
  refs/heads/branch-1.1 f0f6e075f -> beaecd113
  refs/heads/branch-1.2 df17a6949 -> 1e411c8ea
  refs/heads/master 5152ac0e2 -> 2481b7f76


HBASE-14359 HTable#close will hang forever if unchecked error/exception thrown in AsyncProcess#sendMultiAction
(Victor Xu)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2481b7f7
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2481b7f7
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2481b7f7

Branch: refs/heads/master
Commit: 2481b7f76fa7e4f2b120f8dc96004790b357e569
Parents: 5152ac0
Author: Andrew Purtell <apurtell@apache.org>
Authored: Thu Sep 3 17:48:45 2015 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Thu Sep 3 17:48:45 2015 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/client/AsyncProcess.java       | 21 ++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2481b7f7/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
index 0150a2e..96ed184 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
@@ -979,15 +979,20 @@ class AsyncProcess {
           } else {
             try {
               pool.submit(runnable);
-            } catch (RejectedExecutionException ree) {
-              // This should never happen. But as the pool is provided by the end user, let's
secure
-              //  this a little.
+            } 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 + ", the task was rejected by the pool. This is unexpected."
+
+                  " Server is " + server.getServerName(), t);
+              } else {
+                // see #HBASE-14359 for more details
+                LOG.warn("Caught unexpected exception/error: ", t);
+              }
               decTaskCounters(multiAction.getRegions(), server);
-              LOG.warn("#" + id + ", the task was rejected by the pool. This is unexpected."
+
-                  " Server is " + server.getServerName(), ree);
-              // We're likely to fail again, but this will increment the attempt counter,
so it will
-              //  finish.
-              receiveGlobalFailure(multiAction, server, numAttempt, ree);
+              // We're likely to fail again, but this will increment the attempt counter,
+             // so it will finish.
+              receiveGlobalFailure(multiAction, server, numAttempt, t);
             }
           }
         }


Mime
View raw message