[ https://issues.apache.org/jira/browse/RATIS-923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17103001#comment-17103001 ]
Hanisha Koneru commented on RATIS-923: -------------------------------------- Posted a PR with this approach. {quote}1. Should the "largest index in closed segment" be updated during startup. If logs have been purged, how will cache eviction be affected. {quote} Updating the safeCacheEvictIndex on startup too. {quote}2. How will cache eviction be affected by snapshotIndex. {quote} The safeCacheEvitIndex = Max of SnapshotIndex and LastIndexInClosedSegments. When a new snapshot is installed, this index is also updated. > Cache evicted before RollSegment completes > ------------------------------------------ > > Key: RATIS-923 > URL: https://issues.apache.org/jira/browse/RATIS-923 > Project: Ratis > Issue Type: Bug > Reporter: Hanisha Koneru > Assignee: Hanisha Koneru > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > If a segment is evicted from Segment Cache before it is rolled over and > applyTransaction thread tries to read this segment, it can lead to > FileNotFoundException. > Please refer to [~msingh]'s comment in HDDS-3382. -- This message was sent by Atlassian Jira (v8.3.4#803005)