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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix corruption in store reader iterator, take 2 #1088

Merged
merged 1 commit into from Jun 16, 2021

Conversation

appaquet
Copy link
Contributor

@appaquet appaquet commented Jun 16, 2021

This is a follow up from my previous bug fixed in here. The fix resolved the different panics, but didn't solve the underlying issue when a deleted document is at the beginning of a checkpoint. What happened now is that if a deleted document was at the beginning of the block, we weren't taking it into consideration when skipping, causing the iterator to return deleted documents, and the merge to include deleted documents.

Finding the bug was quite a challenge. At first I though it was another underlying issue in 0.15, but bisecting the commits pointed me to my previous fix 馃槵 You can see how I was consistently reproducing it with gist, which is quite intensive. Running it a few times will eventually lead to corrupted results (searching for a term, but getting results that aren't for the term).

I tweaked the unit tests @PSeitz created to fail when a deleted document is returned by the iterator.

@PSeitz
Copy link
Contributor

PSeitz commented Jun 16, 2021

Ah I should have covered this with the unit test. Thanks for the bugfix!

@PSeitz PSeitz merged commit 65546ed into quickwit-oss:main Jun 16, 2021
@fulmicoton
Copy link
Collaborator

Published as a hotfix on 0.15.2.
Thank you @appaquet and sorry for all the trouble.

@appaquet
Copy link
Contributor Author

@fulmicoton Thanks for the release! No problem, this made me understand a bit more the internals of Tantivy. It's an awesome lib and it's core to my personal project :)

@fulmicoton
Copy link
Collaborator

@appaquet Thanks to you! Bugfix on fresh release with an analysis, a patch, and way to reproduce the problem are really my favorite kind of contributions.

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.

None yet

3 participants