sabi0 commented on code in PR #13052:
URL: https://github.com/apache/lucene/pull/13052#discussion_r1470850110


##########
lucene/core/src/java/org/apache/lucene/index/UpgradeIndexMergePolicy.java:
##########
@@ -106,7 +106,11 @@ public MergeSpecification findForcedMerges(
       // the resulting set contains all segments that are left over
       // and will be merged to one additional segment:
       for (final OneMerge om : spec.merges) {
-        oldSegments.keySet().removeAll(om.segments);
+        // om.segments.forEach(::remove) is used here instead of 
oldSegments.keySet().removeAll()
+        // for performance reasons; om.segments size is always greater than 
oldSegments size, and

Review Comment:
   Fixed



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

Reply via email to