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
panic from subtraction overflow during merge, multi-valued fastfield #1151
Comments
Hi Shikar, thank you for the bug report. The multivalued fast field is in fact two fast fields, one fast field to get the range of the multi values (internally The issue here is coming from the idx_reader. They need to be monotonically increasing to get the range, which they are not. Do you still have the broken index e.g. to get the detected codec or some other information about the broken state? That would be helpful. I'll try to reproduce something in our tests. |
@shikhar A few more questions: Are you sorting your index by a specific field? |
Fixes a off by one error in the stats for the index fast field in the multi value fast field. When retrieving the data range for a docid, `get(doc)..get(docid+1)` is requested. On creation the num_vals statistic was set to doc instead of docid + 1. In the multivaluelinearinterpol fast field the last value was therefore not serialized (and would return 0 instead in most cases). So the last document get(lastdoc)..get(lastdoc + 1) would return the invalid range `value..0`. This PR adds a proptest to cover this scenario. A combination of a large number values, since multilinear interpolation is only active for more than 5_000 values, and a merge is required.
Yes, I do currently! There is only one multi-valued fast field. I don't think I can share the index with you but happy to help in remote diagnosing e.g. figure out codec.
no
yes
Awesome, I can try to run with that patch! The index is ending up in this state sooner or later so if indexing runs fine for a few hours I think that should be good confidence about this being the bug. |
@PSeitz 2h in looking good, I'm pretty confident this fixes it! Thank you for the quick patch! |
published in 0.16.1. Apologies for the terrible bug :-S |
Describe the bug
Ran indexing process, which periodically indexes a batch of documents and commits.
No panic in merge.
Which version of tantivy are you using?
0.16
To Reproduce
Not deterministic, once the index is in this state it reproduces but not sure what caused it to get into such a state. Rebuilding the index fixes the problem. If I see a pattern to when the index is entering such a state, I will note here. It has happened twice so far.
Afraid not, for now. Full disclosure: this is happening when using a custom
Directory
implementation, there is a chance that could be implicated. I will try to reproduce with a regularMMapDirectory
, but wanted to report the issue in case a bug if apparent to tantivy devs based on the stacktrace.The text was updated successfully, but these errors were encountered: