lokeshj1703 commented on a change in pull request #89:
URL: https://github.com/apache/incubator-ratis/pull/89#discussion_r421419869



##########
File path: 
ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/SegmentedRaftLogCache.java
##########
@@ -342,10 +342,10 @@ int getMaxCachedSegments() {
   }
 
   void loadSegment(LogPathAndIndex pi, boolean keepEntryInCache,
-      Consumer<LogEntryProto> logConsumer) throws IOException {
+      Consumer<LogEntryProto> logConsumer, long lastIndexInSnapshot) throws 
IOException {
     LogSegment logSegment = LogSegment.loadSegment(storage, 
pi.getPath().toFile(),

Review comment:
       We should not load logSegment if endIndex < lastIndexInSnapshot. We will 
also need to cover the case where endIndex is INVALID_LOG_INDEX.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to