HBASE-14359 HTable#close will hang forever if unchecked error/exception thrown in AsyncProcess#sendMultiAction (Victor Xu)
This commit is contained in:
parent
8a4aee6082
commit
513b37603d
|
@ -978,15 +978,20 @@ class AsyncProcess {
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
pool.submit(runnable);
|
pool.submit(runnable);
|
||||||
} catch (RejectedExecutionException ree) {
|
} catch (Throwable t) {
|
||||||
// This should never happen. But as the pool is provided by the end user, let's secure
|
if (t instanceof RejectedExecutionException) {
|
||||||
// this a little.
|
// This should never happen. But as the pool is provided by the end user,
|
||||||
|
// let's secure this a little.
|
||||||
|
LOG.warn("#" + id + ", the task was rejected by the pool. This is unexpected." +
|
||||||
|
" Server is " + server.getServerName(), t);
|
||||||
|
} else {
|
||||||
|
// see #HBASE-14359 for more details
|
||||||
|
LOG.warn("Caught unexpected exception/error: ", t);
|
||||||
|
}
|
||||||
decTaskCounters(multiAction.getRegions(), server);
|
decTaskCounters(multiAction.getRegions(), server);
|
||||||
LOG.warn("#" + id + ", the task was rejected by the pool. This is unexpected." +
|
// We're likely to fail again, but this will increment the attempt counter,
|
||||||
" Server is " + server.getServerName(), ree);
|
// so it will finish.
|
||||||
// We're likely to fail again, but this will increment the attempt counter, so it will
|
receiveGlobalFailure(multiAction, server, numAttempt, t);
|
||||||
// finish.
|
|
||||||
receiveGlobalFailure(multiAction, server, numAttempt, ree);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue