vigyasharma commented on code in PR #14837: URL: https://github.com/apache/lucene/pull/14837#discussion_r2186901630
########## lucene/core/src/java/org/apache/lucene/index/IndexWriter.java: ########## @@ -3724,18 +3724,25 @@ private long prepareCommitInternal() throws IOException { maybeCloseOnTragicEvent(); } - if (pointInTimeMerges != null) { + if (pointInTimeMerges != null && pointInTimeMerges.merges.size() > 0) { if (infoStream.isEnabled("IW")) { infoStream.message( "IW", "now run merges during commit: " + pointInTimeMerges.segString(directory)); Review Comment: There's a TODO to deprecate `segString(Directory dir)`, and indeed the directory is not used anywhere. We can simply use `toString()` instead. I just happened to find it as I wanted to make sure we log the number of submitted merges. We don't need to address it in this PR, in fact, it could be a good first issue. -- 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