mikemccand commented on a change in pull request #1155: LUCENE-8962: Add 
ability to selectively merge on commit
URL: https://github.com/apache/lucene-solr/pull/1155#discussion_r373738944
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/index/MergePolicy.java
 ##########
 @@ -526,6 +526,19 @@ public abstract MergeSpecification findForcedMerges(
   public abstract MergeSpecification findForcedDeletesMerges(
       SegmentInfos segmentInfos, MergeContext mergeContext) throws IOException;
 
+  /**
+   * Identifies merges that we want to execute (synchronously) on commit. By 
default, do not synchronously merge on commit.
+   *
+   * If a returned {@link OneMerge} includes a segment already included in a 
registered merge, then the commit will fail.
+   * Use {@link MergeContext#getMergingSegments()} to determine which segments 
are currently registered to merge.
+   *
+   * @param segmentInfos the total set of segments in the index (while 
preparing the commit)
+   * @param mergeContext the IndexWriter to find the merges on
 
 Review comment:
   Hmm, maybe improve this (it's not an `IndexWriter`) to say the merge policy 
may use this to find already merging segments?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to