Lets say B's timer ends the fastest, B increments its term by 1 (term 1 now) and becomes leader (which is possible because C and D are also term 1)
Hello!I had a quick question on how Raft is able to enforce log consistency, ie: Log Matching Property: when the term and log number of two nodes match, then the contents of the log should match.If we consider to have 5 nodes, A, B, C, D, EIf they start at roughly the same time, so, they all start with term 0.Lets suppose E gets elected, with votes ONLY from C, D, and A, B are dead,So, currently, in persistent state, A, B are term 0, C, D, E is term 1 with E as leader.Lets say E appends an entry to its own log and dies, failing to replicate.All this happens very quick, and C, D has their election timers reset.A, B comes back alive --> they are still term 0. C, D have no log entries, but they are term 1.
Lets say B's timer ends the fastest, B increments its term by 1 (term 1 now) and becomes leader (which is possible because C and D are also term 1)
B replicates a log to A, C, D --> term 1, log 1 (because all of them don't have any other logs)Node E comes alive. At this point, E has term 1 log 1, but with a different log value...?I'm pretty sure that this is a rudimentary question, but I couldn't really find answers online.Best Regards,Daniel--
You received this message because you are subscribed to the Google Groups "raft-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to raft-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/raft-dev/abbcd60e-bd69-431a-8eec-48a6d84e4550n%40googlegroups.com.