Skip to content

Commit

Permalink
Enable Retrying max requests queued exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
amitkdutta authored and tdcmeehan committed Mar 15, 2022
1 parent 8479f26 commit 3913a1a
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -116,7 +116,14 @@ public void requestFailed(Throwable reason)
}

if (reason instanceof RejectedExecutionException) {
throw new PrestoException(errorCode, reason);
if (reason.getMessage() == null) {
throw new PrestoException(errorCode, reason);
}

// We want to do exponential backoff to allow OOT killer to kill queries and not fail immediately.
if (!reason.getMessage().contains("Max requests queued per destination")) {
throw new PrestoException(errorCode, reason);
}
}

// log failure message
Expand Down

0 comments on commit 3913a1a

Please sign in to comment.