Hi Asad,

I guess you mean that the follower receives an appendEntries request from
the leader.  A log entry with index i in the request has a different term
than the stored index i entry.  In such cases, the follower will truncate
the log.

See
https://github.com/apache/ratis/blob/master/ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/SegmentedRaftLogCache.java#L605

This case is possible since the follower could have some uncommitted
entries in its log received from the previous leader (or received from a
client if this follower was the previous leader).  Since the entries are
uncommitted, they can be safely truncated.

Tsz-Wo


On Fri, May 5, 2023 at 9:28 PM Asad Awadia <[email protected]> wrote:

> Hello,
>
> What is the behaviour when the follower receives a log where the term in
> the request log is different than the local term on the node?
>
> Is the follower node permenanty stuck there?
>
> Is it valid to delete this entry?
>
> Regards,
> Asad
>

Reply via email to