You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "vigyasharma (via GitHub)" <gi...@apache.org> on 2025/07/05 07:14:45 UTC
Re: [PR] Small enhancements to IndexWriter's InfoStream to support segment tracing [lucene]
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org