hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-13694 CallQueueSize is incorrectly decremented until the response is sent
Date Tue, 19 May 2015 16:24:24 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 5e7e626ef -> 74e5b26e5


HBASE-13694 CallQueueSize is incorrectly decremented until the response is sent

Signed-off-by: stack <stack@apache.org>


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

Branch: refs/heads/master
Commit: 74e5b26e57ef8d31723ff05ff913bad7f92a7518
Parents: 5e7e626
Author: Esteban Gutierrez <esteban@cloudera.com>
Authored: Fri May 15 00:57:15 2015 -0700
Committer: stack <stack@apache.org>
Committed: Tue May 19 09:22:31 2015 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/ipc/CallRunner.java | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/74e5b26e/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 fd4de3a..26ffa95 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
@@ -45,6 +45,7 @@ public class CallRunner {
   private Call call;
   private RpcServerInterface rpcServer;
   private MonitoredRPCHandler status;
+  private volatile boolean sucessful;
 
   /**
    * On construction, adds the size of this call to the running count of outstanding call
sizes.
@@ -116,6 +117,10 @@ public class CallRunner {
           traceScope.close();
         }
         RpcServer.CurCall.set(null);
+        if (resultPair != null) {
+          this.rpcServer.addCallSize(call.getSize() * -1);
+          sucessful = true;
+        }
       }
       // Set the response for undelayed calls and delayed calls with
       // undelayed responses.
@@ -146,8 +151,9 @@ public class CallRunner {
       RpcServer.LOG.warn(Thread.currentThread().getName()
           + ": caught: " + StringUtils.stringifyException(e));
     } finally {
-      // regardless if successful or not we need to reset the callQueueSize
-      this.rpcServer.addCallSize(call.getSize() * -1);
+      if (!sucessful) {
+        this.rpcServer.addCallSize(call.getSize() * -1);
+      }
       cleanup();
     }
   }


Mime
View raw message