Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -715,17 +715,24 @@ private void receiveGlobalFailure(MultiAction rsActions, ServerName server, int
errorsByServer.reportServerError(server);
Retry canRetry = errorsByServer.canTryMore(numAttempt) ? Retry.YES : Retry.NO_RETRIES_EXHAUSTED;

cleanServerCache(server, t);
// Do not update cache if exception is from failing to submit action to thread pool
if (!(t instanceof RejectedExecutionException)) {

@bbeaudreault bbeaudreault Dec 5, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this receiveGlobalFailure method is private and only called in 3 places. Rather than add another two instanceof checks here, thoughts on just adding a boolean argument to the method shouldClearCache? We can pass in false everywhere, except in the place where we already instanceof RejectedExecutionException in sendMultiAction

cleanServerCache(server, t);
}

int failed = 0;
int stopped = 0;
List<Action> toReplay = new ArrayList<>();
for (Map.Entry<byte[], List<Action>> e : rsActions.actions.entrySet()) {
byte[] regionName = e.getKey();
byte[] row = e.getValue().get(0).getAction().getRow();
// Do not use the exception for updating cache because it might be coming from
// any of the regions in the MultiAction.
updateCachedLocations(server, regionName, row,
ClientExceptionsUtil.isMetaClearingException(t) ? null : t);
// any of the regions in the MultiAction and do not update cache if exception is
// from failing to submit action to thread pool
if (!(t instanceof RejectedExecutionException)) {
updateCachedLocations(server, regionName, row,
ClientExceptionsUtil.isMetaClearingException(t) ? null : t);
}
for (Action action : e.getValue()) {
Retry retry =
manageError(action.getOriginalIndex(), action.getAction(), canRetry, t, server);
Expand Down