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

LUCENE-9405: Ensure IndexWriter only closes merge readers once. #1580

Merged
merged 2 commits into from
Jun 15, 2020

Conversation

s1monw
Copy link
Member

@s1monw s1monw commented Jun 15, 2020

IndexWriter incorrectly calls closeMergeReaders twice when the
merged segment is 100% deleted ie. would produce a fully deleted
segment.

IndexWriter incorrectly calls closeMergeReaders twice when the
merged segment is 100% deleted ie. would produce a fully deleted
segment.
Copy link
Member

@mikemccand mikemccand left a comment

Choose a reason for hiding this comment

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

This is awesome -- I love the test case with it's onlyFinishOnce!! I left one small comment.

@@ -266,6 +266,9 @@ Bug Fixes
* LUCENE-9362: Fix equality check in ExpressionValueSource#rewrite. This fixes rewriting of inner value sources.
(Dmitry Emets)

* LUCENE-9405: IndexWriter incorrectly calls closeMergeReaders twice when the merged segment is 100% deleted.
(Simon Willnauer, Mike Mccandless, Mike Sokolov)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe also add @msfroh (Michael Froh)? -- I think he fixed this originally in the first PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, and you can remove me - I am just a conduit!

Copy link
Member Author

Choose a reason for hiding this comment

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

I added him, thanks for pointing this out.

Copy link
Member Author

Choose a reason for hiding this comment

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

I will keep you anyways @msokolov

@@ -4167,4 +4167,38 @@ public void testSegmentCommitInfoId() throws IOException {
}
}
}

public void testMergeZeroDocsMergeIsClosedOnce() throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the test

@s1monw s1monw merged commit 47cffbc into apache:master Jun 15, 2020
@s1monw s1monw deleted the LUCENE-9405 branch June 15, 2020 20:02
s1monw added a commit that referenced this pull request Jun 15, 2020
IndexWriter incorrectly calls closeMergeReaders twice when the
merged segment is 100% deleted ie. would produce a fully deleted
segment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants