mikemccand commented on code in PR #16923:
URL: https://github.com/apache/lucene/pull/16923#discussion_r4742696052
##########
lucene/core/src/java/org/apache/lucene/index/IndexWriter.java:
##########
@@ -1324,6 +1334,15 @@ private void shutdown() throws IOException {
flush(true, true);
waitForMerges();
+ synchronized (this) {
+ // If an NRT reader got a version that no commit saved yet (see
finishCommit), commit even
+ // without other changes. Otherwise the next writer on this index
would start from the
+ // older saved version, and could give the same version to a reader
with different
+ // documents:
Review Comment:
Should we maybe set the version to one plus the NRT reader's version?
`changed()` just increments the prior version?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]