-
Notifications
You must be signed in to change notification settings - Fork 161
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
Dynamic Cluster Membership #1031
Comments
👋 Thanks for opening this issue! Get help or engage by:
|
You have initialized the cluster twice with different config, which result in a brain split state. To incrementally setup a cluster, just call Or setup a cluster in oneshot: call Refer to: |
@drmingdrmer First off, thank you for being so responsive :) Also, I saw your conversation on Discord with diptanuc - that helped quite a bit. However, my only point of confusion is that if I want to start two nodes independently of one another - seed_node (node 0) and node 1, how do I start them? The independently is important to me here I can start node 0 using All the examples I've seen just use |
First of all, IMHO, two independent nodes just means brain split. They are equivalent concept, because these two nodes can propose different logs and there is no consensus between them. Because they have different data, you can not add node-1 with non-empty data(i.e., node-1 has already proposed logs and applied) to the seed node node-0 without losing node-1's data. If what you want is to let seed node-0 to discover another empty node to join into the cluster, it is not about Raft. |
Closing this issue. @redixhumayun |
I am trying to set up a dynamic cluster where every node knows of a seed node and tries to contact it to get the latest view of all the members in the cluster. The seed node here is 0.
The way I am going about this is to set up a cluster per node using the
initialize
method. So, my node withnode_id
0 would be initialized asand similarly for
node_id
1 asNow, I trigger a request from node 1 to node 0 to add 1 as a member of the cluster. I follow the pattern laid out in this example of doing
add_learner
followed bychange_membership
.However, I notice that everything is fine until I call
change_membership
at which point node 0 establishes contact with node 1 but then they enter an infinite loop of new elections being triggered. More specifically, every VoteRequest of node 0 fails on node 1 with the following messageIt seems like the log check for VoteRequest is failing. But, why would that be?
I'm wondering if perhaps I'm going about setting up the initialisation wrong? I notice that the docs for the initialize method state that starting two clusters with different configs will result in a split brain situation. Does having separate member node at initialisation count as having separate configs?
If so, what is the correct way to go about doing what I want to do? I notice that the
raft-kv-memstore
code initialises nodes usingnew
. Is that the way to go about it?The text was updated successfully, but these errors were encountered: