Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: add Node information into AppendEntriesRequest request #922

Closed
Tracked by #923
drmingdrmer opened this issue Nov 5, 2023 · 2 comments
Closed
Tracked by #923
Labels
A-membership Area: membership management

Comments

@drmingdrmer
Copy link
Member

Add another field leader_node: Node to AppendEntriesRequest.
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 the AppendEntriesRequest so that
when a heartbeat or append entry request is received by the follower, The
follower will know the leader's information.

@drmingdrmer drmingdrmer added the A-membership Area: membership management label Nov 5, 2023
Copy link

github-actions bot commented Nov 5, 2023

👋 Thanks for opening this issue!

Get help or engage by:

  • /help : to print help messages.
  • /assignme : to assign this issue to you.

@drmingdrmer
Copy link
Member Author

Close it.
Transmitting leader node information is application level requirement, and it should not be in the core of a raft implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-membership Area: membership management
Projects
None yet
Development

No branches or pull requests

1 participant