Skip to content

Fix DirectIOIndexInput seek to not read when position is within buffer #14320

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

Merged
merged 5 commits into from
Mar 3, 2025

Conversation

ChrisHegarty
Copy link
Contributor

@ChrisHegarty ChrisHegarty commented Mar 1, 2025

This commit changes DirectIOIndexInput::seek so that it repositions the indexInput's position without a read, when the new position is within the bounds of the current buffer.

Prior to this fix (on Linux):

times out after more than 10 mins

With this fix:

The slowest tests (exceeding 500 ms) during this run:
   3.48s TestDirectIODirectory.testRandomByte (:lucene:misc)

relates #14315

@dweiss
Copy link
Contributor

dweiss commented Mar 2, 2025

Good find!

@ChrisHegarty
Copy link
Contributor Author

I’m going to see if I can write a few small unit tests for this particular scenario.

Copy link
Member

@rmuir rmuir left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@ChrisHegarty ChrisHegarty merged commit f8fac44 into apache:main Mar 3, 2025
7 checks passed
@ChrisHegarty ChrisHegarty deleted the dio_seek_fix branch March 3, 2025 12:16
ChrisHegarty added a commit that referenced this pull request Mar 3, 2025
#14320)

This commit changes DirectIOIndexInput::seek so that it repositions the indexInput's position without a read, when the new position is within the bounds of the current buffer.
hanbj pushed a commit to hanbj/lucene that referenced this pull request Mar 12, 2025
apache#14320)

This commit changes DirectIOIndexInput::seek so that it repositions the indexInput's position without a read, when the new position is within the bounds of the current buffer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants