Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-135

Closed segments contribute to leaked memory as eviction policies are not honoured

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.2.0
    • None
    • None

    Description

      Closed segments leak memory as eviction does not remove these segments from closed segments list.

       void evictCache(long[] followerIndices, long flushedIndex,
            long lastAppliedIndex) {
          List<LogSegment> toEvict = evictionPolicy.evict(followerIndices,
              flushedIndex, lastAppliedIndex, closedSegments, maxCachedSegments);
          for (LogSegment s : toEvict) {
            s.evictCache();
          }
      

      After the segments have been marked for eviction, they should be removed from queue as well.

      Attachments

        1. RATIS-135.001.patch
          1 kB
          Mukul Kumar Singh
        2. RATIS-135.002.patch
          0.6 kB
          Mukul Kumar Singh

        Activity

          People

            msingh Mukul Kumar Singh
            msingh Mukul Kumar Singh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: