-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Conversation
IndexWriter incorrectly calls closeMergeReaders twice when the merged segment is 100% deleted ie. would produce a fully deleted segment.
There was a problem hiding this 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.
lucene/CHANGES.txt
Outdated
@@ -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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the test
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.