Feature: add Node
information into AppendEntriesRequest
request
#922
Labels
A-membership
Area: membership management
Add another field
leader_node: Node
toAppendEntriesRequest
.This way the follower or learner can perceive the node information even when the
leader is not in the membership config.
https://github.com/datafuselabs/openraft/blob/732304ba080dd22e778749d35e71914bc35ea048/openraft/src/raft/message/append_entries.rs#L14-L27
Why
Openraft allows a leader to be not in the membership.
When a leader commits a new membership config that does not contain itself,
the leader will continue to run for a while. During this period, the leader is
not in the cluster(not a voter or learner).
When a Follower receives write-log request, it just returns an error indicating
the caller to forward the request to the leader. But the follower can not find
out
Node
information in its local memberhship config.Thus we must embed the leader
Node
into theAppendEntriesRequest
so thatwhen a heartbeat or append entry request is received by the follower, The
follower will know the leader's information.
The text was updated successfully, but these errors were encountered: