s1monw commented on a change in pull request #1623:
URL: https://github.com/apache/lucene-solr/pull/1623#discussion_r471957713
##########
File path: lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
##########
@@ -3335,49 +3416,60 @@ public void mergeFinished(boolean committed, boolean
segmentDropped) throws IOEx
// includedInCommit will be set (above, by our caller) to false if
the allowed max wall clock
// time (IWC.getMaxCommitMergeWaitMillis()) has elapsed, which
means we did not make the timeout
// and will not commit our merge to the to-be-commited SegmentInfos
-
if (segmentDropped == false
&& committed
- && includeInCommit.get()) {
+ && includeMergeResult.get()) {
+
+ // make sure onMergeComplete really was called:
+ assert origInfo != null;
if (infoStream.isEnabled("IW")) {
infoStream.message("IW", "now apply merge during commit: " +
toWrap.segString());
}
- // make sure onMergeComplete really was called:
- assert origInfo != null;
-
- deleter.incRef(origInfo.files());
+ if (trigger == MergeTrigger.COMMIT) { // if we do this in a
getReader call here this is obsolete
+ deleter.incRef(origInfo.files());
Review comment:
I extended the comment
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]