HBASE-16611 Flakey org.apache.hadoop.hbase.client.TestReplicasClient.testCancelOfMultiGet

This commit is contained in:
chenheng 2016-09-13 14:52:50 +08:00
parent 422734e73d
commit cd9f422373
1 changed files with 2 additions and 2 deletions

View File

@ -756,7 +756,7 @@ class AsyncProcess {
@Override @Override
public void run() { public void run() {
AbstractResponse res; AbstractResponse res = null;
CancellableRegionServerCallable callable = currentCallable; CancellableRegionServerCallable callable = currentCallable;
try { try {
// setup the callable based on the actions, if we don't have one already from the request // setup the callable based on the actions, if we don't have one already from the request
@ -802,7 +802,7 @@ class AsyncProcess {
throw new RuntimeException(t); throw new RuntimeException(t);
} finally { } finally {
decTaskCounters(multiAction.getRegions(), server); decTaskCounters(multiAction.getRegions(), server);
if (callsInProgress != null && callable != null) { if (callsInProgress != null && callable != null && res != null) {
callsInProgress.remove(callable); callsInProgress.remove(callable);
} }
} }