s1monw commented on code in PR #12829:
URL: https://github.com/apache/lucene/pull/12829#discussion_r1440307876


##########
lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java:
##########
@@ -245,10 +274,11 @@ long updateDocuments(
             onNewDocOnRAM.run();
           }
         }
-        allDocsIndexed = true;
-        if (numDocsInRAM - docsInRamBefore > 1) {
+        final int numDocs = numDocsInRAM - docsInRamBefore;
+        if (numDocs > 1) {
           segmentInfo.setHasBlocks();

Review Comment:
   yes that is exactly right. I will add a test



-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to