From c2bfc64719718a8d2743cad91a25a842389062df Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Fri, 8 Aug 2014 18:41:18 -0700 Subject: [PATCH] HBASE-11705 callQueueSize should be decremented in a fail-fast scenario (Esteban Gutierrez) --- .../src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java index 33474d4d20a..c36478621f4 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java @@ -110,7 +110,6 @@ public class CallRunner { RequestContext.clear(); } RpcServer.CurCall.set(null); - this.rpcServer.addCallSize(call.getSize() * -1); // Set the response for undelayed calls and delayed calls with // undelayed responses. if (!call.isDelayed() || !call.isReturnValueDelayed()) { @@ -139,6 +138,9 @@ public class CallRunner { } catch (Exception e) { RpcServer.LOG.warn(Thread.currentThread().getName() + ": caught: " + StringUtils.stringifyException(e)); + } finally { + // regardless if succesful or not we need to reset the callQueueSize + this.rpcServer.addCallSize(call.getSize() * -1); } }