-
Notifications
You must be signed in to change notification settings - Fork 322
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
s2: non Indexed Seek may seek to the wrong offset #632
Comments
Thanks for the reproducer. I will take a look! |
klauspost
added a commit
that referenced
this issue
Jun 29, 2022
Un-indexed forward seeks does not preserve correct absolute offset when fully skipping blocks. If stream is seekable, but no index is provided, allow non-random seeking. Fixes #632
@JustinAzoff Thanks for the report again. I have added a fix in #633 - I added a slightly modified version of your reproducer as a test. I will release a new version shortly. |
klauspost
added a commit
that referenced
this issue
Jun 29, 2022
* s2: Fix absolute forward seeks Un-indexed forward seeks does not preserve correct absolute offset when fully skipping blocks. If stream is seekable, but no index is provided, allow non-random seeking. Fixes #632
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
I have noticed an issue where the non-indexed Seek code may skip to the wrong offset depending on what parameters are used. I'm not quite sure what is wrong yet, but I was able to work out a test case that shows the issue well.
This writes 1,000,000 25 byte records, then attempts to seek through them using different skip lengths. The part that made this hard to track down is that for small skip sizes it works properly, but large sizes return invalid data, or try seeking too far and trigger
unexpected EOF
.The text was updated successfully, but these errors were encountered: