[ 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 enabled with soft-deletes. 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] , I think 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 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. > 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 > Assignee: Nhat Nguyen > Priority: Minor > Attachments: IMG21.jpeg > > Time Spent: 20m > Remaining Estimate: 0h > > In lucene 8.4 (Elasticsearch 7.6.2), all indices are enabled with > soft-deletes. 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] > , I think 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