diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java index 10d4f38a3bb..097206c2058 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java @@ -789,7 +789,7 @@ class AsyncProcess { @Override public void run() { - MultiResponse res; + MultiResponse res = null; PayloadCarryingServerCallable callable = currentCallable; try { // setup the callable based on the actions, if we don't have one already from the request @@ -828,7 +828,7 @@ class AsyncProcess { throw new RuntimeException(t); } finally { decTaskCounters(multiAction.getRegions(), server); - if (callsInProgress != null && callable != null) { + if (callsInProgress != null && callable != null && res != null) { callsInProgress.remove(callable); } }