hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject hbase git commit: HBASE-13851 RpcClientImpl.close() can hang with cancelled replica RPCs
Date Sat, 06 Jun 2015 21:01:46 GMT
Repository: hbase
Updated Branches:
  refs/heads/master c1d970b04 -> 587b0b4f2


HBASE-13851 RpcClientImpl.close() can hang with cancelled replica RPCs


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

Branch: refs/heads/master
Commit: 587b0b4f20bdc0415b6541023e611b69c87dba15
Parents: c1d970b
Author: Enis Soztutar <enis@apache.org>
Authored: Sat Jun 6 14:01:33 2015 -0700
Committer: Enis Soztutar <enis@apache.org>
Committed: Sat Jun 6 14:01:33 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/ipc/RpcClientImpl.java   | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/587b0b4f/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClientImpl.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClientImpl.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClientImpl.java
index 9a5fc14..fcfd620 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClientImpl.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClientImpl.java
@@ -1113,6 +1113,16 @@ public class RpcClientImpl extends AbstractRpcClient {
     synchronized (connections) {
       for (Connection conn : connections.values()) {
         conn.interrupt();
+        if (conn.callSender != null) {
+          conn.callSender.interrupt();
+        }
+
+        // In case the CallSender did not setupIOStreams() yet, the Connection may not be
started
+        // at all (if CallSender has a cancelled Call it can happen). See HBASE-13851
+        if (!conn.isAlive()) {
+          conn.markClosed(new InterruptedIOException("RpcClient is closing"));
+          conn.close();
+        }
       }
     }
 


Mime
View raw message