You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2017/11/15 22:44:25 UTC
hbase git commit: HBASE-19215 Incorrect exception handling on the
client causes incorrect call timeouts and byte buffer allocations on the
server
Repository: hbase
Updated Branches:
refs/heads/branch-1.2 041fbe71b -> 0cc34b8f6
HBASE-19215 Incorrect exception handling on the client causes incorrect call timeouts and byte buffer allocations on the server
Signed-off-by: Andrew Purtell <ap...@apache.org>
Amending-Author: Andrew Purtell <ap...@apache.org>
Conflicts:
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/BlockingRpcConnection.java
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/0cc34b8f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/0cc34b8f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/0cc34b8f
Branch: refs/heads/branch-1.2
Commit: 0cc34b8f620e91cbd3fba53a7f3186b8d830c851
Parents: 041fbe7
Author: Abhishek Singh Chouhan <ac...@apache.org>
Authored: Mon Nov 13 17:16:31 2017 +0530
Committer: Andrew Purtell <ap...@apache.org>
Committed: Wed Nov 15 14:43:03 2017 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java | 8 ++++++++
.../main/java/org/apache/hadoop/hbase/ipc/RpcClientImpl.java | 7 +++++--
2 files changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/0cc34b8f/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java
index 67682f8..4189b85 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java
@@ -315,4 +315,12 @@ public class IPCUtil {
Preconditions.checkArgument(totalSize < Integer.MAX_VALUE);
return totalSize;
}
+
+ static IOException toIOE(Throwable t) {
+ if (t instanceof IOException) {
+ return (IOException) t;
+ } else {
+ return new IOException(t);
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/0cc34b8f/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 0260176..647e917 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
@@ -921,11 +921,14 @@ public class RpcClientImpl extends AbstractRpcClient {
try {
call.callStats.setRequestSizeBytes(IPCUtil.write(this.out, header, call.param,
cellBlock));
- } catch (IOException e) {
+ } catch (Throwable t) {
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("Error while writing call, call_id:" + call.id, t);
+ }
// We set the value inside the synchronized block, this way the next in line
// won't even try to write. Otherwise we might miss a call in the calls map?
shouldCloseConnection.set(true);
- writeException = e;
+ writeException = IPCUtil.toIOE(t);
interrupt();
}
}