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 Call call;
|
||||||
private RpcServerInterface rpcServer;
|
private RpcServerInterface rpcServer;
|
||||||
private MonitoredRPCHandler status;
|
private MonitoredRPCHandler status;
|
||||||
|
private volatile boolean sucessful;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On construction, adds the size of this call to the running count of outstanding call sizes.
|
* 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();
|
traceScope.close();
|
||||||
}
|
}
|
||||||
RpcServer.CurCall.set(null);
|
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
|
// Set the response for undelayed calls and delayed calls with
|
||||||
// undelayed responses.
|
// undelayed responses.
|
||||||
|
@ -146,8 +151,9 @@ public class CallRunner {
|
||||||
RpcServer.LOG.warn(Thread.currentThread().getName()
|
RpcServer.LOG.warn(Thread.currentThread().getName()
|
||||||
+ ": caught: " + StringUtils.stringifyException(e));
|
+ ": caught: " + StringUtils.stringifyException(e));
|
||||||
} finally {
|
} finally {
|
||||||
// regardless if successful or not we need to reset the callQueueSize
|
if (!sucessful) {
|
||||||
this.rpcServer.addCallSize(call.getSize() * -1);
|
this.rpcServer.addCallSize(call.getSize() * -1);
|
||||||
|
}
|
||||||
cleanup();
|
cleanup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue