-
Notifications
You must be signed in to change notification settings - Fork 157
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
Refine cluster initialization procedure #45
Comments
👋 Thanks for opening this issue! Get help or engage by:
|
what i understand is pre-appened a membership log at index 0,with term 0 that helpful for the cluster first startup, as your said we don't need to judge |
If a node has received any log from some Leader, when starting up it has not to add a log at (0,0); If a node has no logs at all, when |
Okk,i seem to understand. |
/assignme |
@eliasyaoyc |
today or tomorrow. |
general plan, add a param on |
What is the name of param that will be added? Since IMO, it could always read the state from storage without the help of other additional fields. Currently, the implementation adds a blank log entry at term:0, index:0, so that the initial value of such as I've been trying to remove this initial log |
I don't know how to notify |
|
yes,
Is there something wrong with my understanding? 😭 |
These should be done in I've get this done in: https://github.com/datafuselabs/openraft/pull/107/files#diff-2b96982d340b2d4f989026d55516c495678f2320fe05d2841c65748f52c42ff5 |
The cluster init procedure is specialized and introduced duplicated codes.
This procedure could be safely implemented with existing routines.
This way to reduce code and make it more easier to test.
Currently:
Expected:
This way:
commit_initial_leader_entry
does not need to checklast_log_index == 0
.The text was updated successfully, but these errors were encountered: