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

(cherry picked from commit 1d6eb77)
  • Loading branch information
bsglz committed Jul 1, 2021
1 parent 3227967 commit 9c7d9fa
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,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 9c7d9fa

Please sign in to comment.