-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Blob-cache get remove false negatives #104696
Blob-cache get remove false negatives #104696
Conversation
The blob cache would sometimes respond with an already closed exception even though regions could be made available. Fixed to only do so when there really are no available regions (which should never happen with region count > thread count, i.e., normally). One exception is explicit evict, which only happens on explicit clear cache or corruptions.
Hi @henningandersen, I've created a changelog YAML for you. |
Failure looks unrelated, filed it here: #104708 |
@elasticmachine run elasticsearch-ci/part-4 |
...ugin/blob-cache/src/main/java/org/elasticsearch/blobcache/shared/SharedBlobCacheService.java
Show resolved
Hide resolved
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.
LGTM
return ioRef; | ||
} | ||
} finally { | ||
unlink(entry); |
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 will also stop iterating over other entries with same freq. I think this is OK since we only try to evict 1 CacheFileRegion and take its IO but maybe we can add a return
statement at the end of the if (evicted) {
block to make it explicit that no more cache entries will be evaluated?
Will likely handle this in one PR in #104746 to avoid drip-wise changes. |
Handled in #104784 |
The blob cache would sometimes respond with an already closed exception even though regions could be made available. Fixed to only do so when there really are no available regions (which should never happen with region count >= thread count, i.e., normally).
One exception is explicit evict, which only happens on explicit clear cache or corruptions.
Marked DRAFT for now to get input on approach, check that tests succeed and perhaps add a bit more testing.