Skip to content
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

Conversation

henningandersen
Copy link
Contributor

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.

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.
@henningandersen henningandersen added >enhancement :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.13.0 labels Jan 24, 2024
@henningandersen henningandersen requested a review from tlrx January 24, 2024 12:34
@elasticsearchmachine
Copy link
Collaborator

Hi @henningandersen, I've created a changelog YAML for you.

@henningandersen
Copy link
Contributor Author

Failure looks unrelated, filed it here: #104708

@henningandersen
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/part-4

Copy link
Member

@tlrx tlrx left a 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);
Copy link
Member

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?

@henningandersen
Copy link
Contributor Author

Will likely handle this in one PR in #104746 to avoid drip-wise changes.

@henningandersen
Copy link
Contributor Author

Handled in #104784

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants