-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-27491: do not clear cache on RejectedExecutionException #4914
Conversation
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@@ -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)) { |
There was a problem hiding this comment.
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
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Bryan Beaudreault <[email protected]>
Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Bryan Beaudreault <[email protected]>
…Exception (apache#4914) Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Bryan Beaudreault <[email protected]>
…4914) Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Bryan Beaudreault <[email protected]> (cherry picked from commit f1bfda1) Change-Id: Ieb307623e33665245a3d81935da6195ac9c17a26
Batch requests submitted via AsyncProcess can fail if the pool is too small or backing region servers are overloaded. Currently, this will result in a meta cache clear which can further exacerbate the problem. Here we special case the exception to no clear the cache.
cc: @bbeaudreault