You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change: use term, node_id, index to identify a log entry
Simplify election: in a `term`, it allows to elect more than one leader
and the one with greatest `Vote`, i.e., `term, node_id` wins.
Only the last established leader is valid.
A node is able to grant more than one vote within one term.
A greater `Vote` will always be granted.
This modification turns the `Vote` from partial order to a total order
value. Thus the vote granting is simple as comparing two value.
- Change: Vote now is a tuple of `term, node_id` and is compared in
dictionary order.
Greater Vote wins.
There is another field `committed` in `Vote`, which is not necessary
to be persisted by storage layer.
Saving it won't affect correctness.
- Add: LeaderId into LogId, LogId is identified by `term, node_id, index`.
0 commit comments