Xushaohong commented on code in PR #745:
URL: https://github.com/apache/ratis/pull/745#discussion_r975316214
##########
ratis-server/src/main/java/org/apache/ratis/server/leader/LogAppenderBase.java:
##########
@@ -158,6 +158,11 @@ private TermIndex getPrevious(long nextIndex) {
}
}
+ final long raftLogLastPurgedIndex = getRaftLog().getStartIndex() - 1;
+ if (raftLogLastPurgedIndex == previousIndex) {
+ return TermIndex.valueOf(server.getInfo().getCurrentTerm(),
raftLogLastPurgedIndex);
Review Comment:
[#89
](https://github.com/hanishakoneru/ratis/blob/d75cab2b5c44b6b321b98b812df8919be169fea5/ratis-server/src/main/java/org/apache/ratis/server/impl/LogAppender.java#L251-L252)
I found a historical issue here, but I am not sure why only ignores this
case in the appender rather than also in the receiver.
If we inherit the logic here, shall we soften the limit in the follower's
check?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]