[
https://issues.apache.org/jira/browse/RATIS-1890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tsz-wo Sze resolved RATIS-1890.
-------------------------------
Fix Version/s: 3.0.0
(was: 2.5.2)
Resolution: Fixed
The pull request is now merged. Thanks, [~ivanandika]!
> SegmentedRaftLogCache#shouldEvict should only iterate over closed segments
> once
> -------------------------------------------------------------------------------
>
> Key: RATIS-1890
> URL: https://issues.apache.org/jira/browse/RATIS-1890
> Project: Ratis
> Issue Type: Improvement
> Affects Versions: 2.4.0, 2.4.1, 2.5.0, 2.5.1
> Reporter: Ivan Andika
> Priority: Minor
> Fix For: 3.0.0
>
> Attachments: 921_review.patch, image-2023-09-18-13-17-25-569.png,
> profile_cpu_high_rpc_0915_ck_om3.html
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> It's observed that `SegmentedLogCache#shouldEvict` iterate over the
> `closedSegments` twice:
> * `LogSegmentList#countCached`
> * `LogSegmentList#getTotalCacheSize`
> !image-2023-09-18-13-17-25-569.png|width=302,height=198!
> We can improve this by iterating over the `closedSegments` once.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)