You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/02/11 22:42:37 UTC

[GitHub] [lucene-solr] mikemccand commented on a change in pull request #2342: LUCENE-9406: Add IndexWriterEventListener to track events in IndexWriter

mikemccand commented on a change in pull request #2342:
URL: https://github.com/apache/lucene-solr/pull/2342#discussion_r574877053



##########
File path: lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
##########
@@ -3518,15 +3518,30 @@ private long prepareCommitInternal() throws IOException {
       }
 
       if (pointInTimeMerges != null) {
+        MergePolicy.OneMerge nextMerge = null;
+
+        if (pendingMerges.size() > 0) {
+          // nocommit getting OneMerge instance here via mergeSource.getNextMerge() will

Review comment:
       How about passing the `pendingMerges` to the event listener instead?  (Sorry if I asked for `OneMerge` on the issue!  `MergeSpecification` is better since it can hold multiple merges, allows event listener to log things like how many merges were requested during `commit`, etc.).




----------------------------------------------------------------
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.

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