HBASE-13694 CallQueueSize is incorrectly decremented until the response is sent
Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
5e7e626ef5
commit
74e5b26e57
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue