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



##########
File path: 
ratis-server/src/main/java/org/apache/ratis/server/raftlog/RaftLog.java
##########
@@ -313,11 +338,15 @@ protected void validateLogEntry(LogEntryProto entry) {
     }
     TermIndex lastTermIndex = getLastEntryTermIndex();
     if (lastTermIndex != null) {
+      long latestSnapshotIndex = getSnapshotIndex();
+      long lastIndex = lastTermIndex.getIndex() > latestSnapshotIndex ?
+          lastTermIndex.getIndex() : latestSnapshotIndex;

Review comment:
       Suppose a scenario : Snapshot is getting installed at index 50 and log 
entry is getting appended at index 40 or 60. Is this case possible today?




----------------------------------------------------------------
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