Skip to content

Commit

Permalink
HBASE-26027 The calling of HTable.batch blocked at AsyncRequestFuture… (
Browse files Browse the repository at this point in the history
#3419)

* HBASE-26027 The calling of HTable.batch blocked at AsyncRequestFutureImpl.waitUntilDone caused by ArrayStoreException
  • Loading branch information
bsglz authored Jul 1, 2021
1 parent 1381df4 commit 1d6eb77
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,15 @@ private String buildDetailedErrorMsg(String string, int index) {
@Override
public void waitUntilDone() throws InterruptedIOException {
try {
waitUntilDone(Long.MAX_VALUE);
if (this.operationTimeout > 0) {
// the worker thread maybe over by some exception without decrement the actionsInProgress,
// then the guarantee of operationTimeout will be broken, so we should set cutoff to avoid
// stuck here forever
long cutoff = (EnvironmentEdgeManager.currentTime() + this.operationTimeout) * 1000L;
waitUntilDone(cutoff);
} else {
waitUntilDone(Long.MAX_VALUE);
}
} catch (InterruptedException iex) {
throw new InterruptedIOException(iex.getMessage());
} finally {
Expand Down

0 comments on commit 1d6eb77

Please sign in to comment.