[ https://issues.apache.org/jira/browse/LUCENE-10041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Feng Gui updated LUCENE-10041: ------------------------------ Description: In lucene 8.4 (Elasticsearch 7.6.2), all indices are soft-deletes enabled. We found the *TieredMergePolicy* contains redundant query computation to acquire numDeletesToMerge for findMerges. According to code from [getSortedBySegmentSize|https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/TieredMergePolicy.java#L303] , we should reuse the result of numDeletesToMerge which can reduce 3% CPU and some IO overheads. was: In lucene 8.4 (Elasticsearch 7.6.2),all indices is soft-deletes enabled. We found the *TieredMergePolicy* contains redundant query computation for acquire numDeletesToMerge. According to code from [getSortedBySegmentSize|https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/TieredMergePolicy.java#L303] , we should reuse the result of numDeletesToMerge which can reduce 3% CPU and some IO overheads。 > Duplication computation for TieredMergePolicy's numDeletesToMerge > ----------------------------------------------------------------- > > Key: LUCENE-10041 > URL: https://issues.apache.org/jira/browse/LUCENE-10041 > Project: Lucene - Core > Issue Type: Improvement > Components: core/index > Affects Versions: 8.4 > Reporter: Feng Gui > Priority: Minor > Attachments: IMG21.jpeg > > > In lucene 8.4 (Elasticsearch 7.6.2), all indices are soft-deletes enabled. We > found the *TieredMergePolicy* contains redundant query computation to acquire > numDeletesToMerge for findMerges. According to code from > [getSortedBySegmentSize|https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/TieredMergePolicy.java#L303] > , we should reuse the result of numDeletesToMerge which can reduce 3% CPU > and some IO overheads. > > > > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org