HBASE-11705 callQueueSize should be decremented in a fail-fast scenario (Esteban Gutierrez)
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/cb4ac0d3 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/cb4ac0d3 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/cb4ac0d3 Branch: refs/heads/0.98 Commit: cb4ac0d397a77f03715e431b87c8b67bff7aa18c Parents: b7b1d01 Author: Andrew Purtell <[email protected]> Authored: Fri Aug 8 18:41:18 2014 -0700 Committer: Andrew Purtell <[email protected]> Committed: Fri Aug 8 18:41:33 2014 -0700 ---------------------------------------------------------------------- .../src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/cb4ac0d3/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java ---------------------------------------------------------------------- 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 31484bb..8a34a82 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); } }
