avoid clearing server in cache when scanner closed and interrupted#5313
Merged
keith-turner merged 1 commit intoapache:2.1from Feb 14, 2025
Merged
avoid clearing server in cache when scanner closed and interrupted#5313keith-turner merged 1 commit intoapache:2.1from
keith-turner merged 1 commit intoapache:2.1from
Conversation
When the thread running an accumulo scanner is interrupted it may cause the server the scanner was reading from to be cleared from the cache. This can be disruptive in the case where the server is fine. This change makes a narrow exception to clearing the server from the cache for the case where the scanner was closed and an interrupt was seen. The reason this is so narrow is to avoid failing to invalidate the cache in the case where there is actually a problem with the server.
Contributor
|
I looked at TabletServerBatchReaderIterator and am wondering if we should not invalidate the cache if the queryThreadPool is shutdown. I could not determine from looking at the code if that was needed or not. |
Contributor
Author
I did not fully follow all the code, but if closing the batch scanner cause spurious exceptions in background threads which unnecessarily clear the cache then that would be a good change to make. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the thread running an accumulo scanner is interrupted it may cause the server the scanner was reading from to be cleared from the cache. This can be disruptive in the case where the server is fine. This change makes a narrow exception to clearing the server from the cache for the case where the scanner was closed and an interrupt was seen. The reason this is so narrow is to avoid failing to invalidate the cache in the case where there is actually a problem with the server.