jpountz commented on code in PR #13324: URL: https://github.com/apache/lucene/pull/13324#discussion_r1583328423
########## lucene/core/src/java/org/apache/lucene/index/IndexWriter.java: ########## @@ -6128,7 +6128,7 @@ public final int numDeletesToMerge(SegmentCommitInfo info) throws IOException { ensureOpen(false); validate(info); MergePolicy mergePolicy = config.getMergePolicy(); - final ReadersAndUpdates rld = getPooledInstance(info, false); + final ReadersAndUpdates rld = getPooledInstance(info, true); Review Comment: If we pass `create=true` then we don't need to handle the case when `rld` is `null` below? There is a comment there saying that returning the number of hard deletes is safe, which confuses me since you're suggesting it's actually a problem? Maybe @s1monw can help shed a light? -- 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