You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Mukul Kumar Singh (JIRA)" <ji...@apache.org> on 2017/11/06 07:08:00 UTC

[jira] [Updated] (RATIS-135) Closed segments contribute to leaked memory as eviction policies are not honoured

     [ https://issues.apache.org/jira/browse/RATIS-135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mukul Kumar Singh updated RATIS-135:
------------------------------------
    Attachment: RATIS-135.001.patch

> Closed segments contribute to leaked memory as eviction policies are not honoured
> ---------------------------------------------------------------------------------
>
>                 Key: RATIS-135
>                 URL: https://issues.apache.org/jira/browse/RATIS-135
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: Mukul Kumar Singh
>            Assignee: Mukul Kumar Singh
>         Attachments: RATIS-135.001.patch
>
>
> Closed segments leak memory as eviction does not remove these segments from closed segments list.
> {code}
>  void evictCache(long[] followerIndices, long flushedIndex,
>       long lastAppliedIndex) {
>     List<LogSegment> toEvict = evictionPolicy.evict(followerIndices,
>         flushedIndex, lastAppliedIndex, closedSegments, maxCachedSegments);
>     for (LogSegment s : toEvict) {
>       s.evictCache();
>     }
> {code}
> After the segments have been marked for eviction, they should be removed from queue as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)