-
Notifications
You must be signed in to change notification settings - Fork 998
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
Make Raft.LeaderCh() return a new channel for each invocation #427
base: main
Are you sure you want to change the base?
Conversation
.. and immediately send the current leadership state over the channel. This way it can be used by multiple pieces of code with disrupting another. Sending the value immediately avoids strange race conditions when RaftState gets updated at a slightly different moment. fixes hashicorp#426
I forgot to update r.leaderChLastMessage
This is available since hashicorp/raft#427 but the code is backwards compatible and detects whether your version of Raft includes it.
This is available since hashicorp/raft#427 but the code is backwards compatible and detects whether your version of Raft includes it.
This is available since hashicorp/raft#427 but the code is backwards compatible and detects whether your version of Raft includes it.
Hey there, |
still relevant |
Hey there, |
still relevant, discussion in #426 got some traction the other day actually |
.. and immediately send the current leadership state over the channel.
This way it can be used by multiple pieces of code with disrupting another.
Sending the value immediately avoids strange race conditions when RaftState gets updated at a slightly different moment.
fixes #426