Make Raft.LeaderCh() return a new channel for each invocation#427
Make Raft.LeaderCh() return a new channel for each invocation#427Jille wants to merge 3 commits intohashicorp:mainfrom
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