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

Add bw tests for block-tree with inlined metadata. #13527

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Jun 27, 2024

The backport of #13524 found a hole in the testing of Lucene40BlockTreeTerms for versions before we moved metadata to its own file. This PR adds explicit bw testing for this version. Adding the correct if/else statements made the code extremely complicated so I opted for restoring the file as it was at the time when we bumped the version.

This also fixes the bug that we introduced in #13524.

The backport of apache#13524 found a hole in the testing of `Lucene40BlockTreeTerms`
for versions before we moved metadata to its own file. This PR adds explicit bw
testing for this version. Adding the correct if/else statements made the code
extremely complicated so I opted for restoring the file as it was at the time
when we bumped the version.

This also fixes the bug that we introduced in apache#13524.
@@ -196,6 +196,7 @@ public void testUnsupportedOldIndexes() throws Exception {
ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
CheckIndex checker = new CheckIndex(dir);
checker.setInfoStream(new PrintStream(bos, false, UTF_8));
checker.setLevel(CheckIndex.Level.MIN_LEVEL_FOR_INTEGRITY_CHECKS);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also added this, as it looks like we decreased coverage for ancient indices when we decreased the default level for CheckIndex. Unfortunately, this would still not have been enough to find this bug as the bw indices are too small to have meaningful data in their terms index that would have trigger the bug.

@jpountz jpountz merged commit 44ad4d9 into apache:main Jun 28, 2024
3 checks passed
jpountz added a commit that referenced this pull request Jun 28, 2024
The backport of #13524 found a hole in the testing of `Lucene40BlockTreeTerms`
for versions before we moved metadata to its own file. This PR adds explicit bw
testing for this version. Adding the correct if/else statements made the code
extremely complicated so I opted for restoring the file as it was at the time
when we bumped the version.

This also fixes the bug that we introduced in #13524.
linfn pushed a commit to linfn/lucene that referenced this pull request Nov 5, 2024
The backport of apache#13524 found a hole in the testing of `Lucene40BlockTreeTerms`
for versions before we moved metadata to its own file. This PR adds explicit bw
testing for this version. Adding the correct if/else statements made the code
extremely complicated so I opted for restoring the file as it was at the time
when we bumped the version.

This also fixes the bug that we introduced in apache#13524.
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.

1 participant