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

[9.x] Ensure to use IOContext.READONCE when reading segment files #13578

Merged
merged 5 commits into from
Jul 17, 2024

Conversation

ChrisHegarty
Copy link
Contributor

…ache#13574)

This commit uses IOContext.READONCE in more places where the index input is clearly being read once by the thread opening it. We can then enforce that segment files are only opened with READONCE, in the test specific Mock directory wrapper.

Much of the changes in this PR update individual test usage, but there is one non-test change to Directory::copyFrom.
Copy link
Contributor

@uschindler uschindler left a comment

Choose a reason for hiding this comment

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

The error ist strange, in 9.x there seems to be one other place where the segment file is read with wrong context.

Or the reason is that READONCE is not necessarily a singleton in 9.x. The check in MockDirWrapper needs to be different.

@ChrisHegarty ChrisHegarty merged commit b2d3a2b into apache:branch_9x Jul 17, 2024
3 checks passed
@ChrisHegarty ChrisHegarty deleted the branch_9x branch July 17, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants