rahulgoswami commented on code in PR #3883:
URL: https://github.com/apache/solr/pull/3883#discussion_r2563438019


##########
solr/core/src/java/org/apache/solr/index/LatestVersionFilterMergePolicy.java:
##########
@@ -0,0 +1,52 @@
+package org.apache.solr.index;
+
+import java.io.IOException;
+import java.util.Map;
+import org.apache.lucene.index.MergePolicy;
+import org.apache.lucene.index.MergeTrigger;
+import org.apache.lucene.index.SegmentCommitInfo;
+import org.apache.lucene.index.SegmentInfos;
+import org.apache.lucene.index.TieredMergePolicy;
+import org.apache.lucene.util.Version;
+
+/**
+ * Only allows latest version segments to be considered for merges. That way a 
snapshot of older
+ * segments can remain consistent
+ */
+public class LatestVersionFilterMergePolicy extends MergePolicy {

Review Comment:
   Great suggestion. Much better for delegation.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to