-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Raft.LeaderCh() has two problems: It always returns the same channel and it doesn't prepopulate the channel with the current value. Reconstructing this has proven error prone/impossible.
RegisterObserver() was my next attempt, but the LocalAddress isn't exposed (except by the Transport, which not be available to library code).
I propose to make Raft.LeaderCh() return a new channel per call, and prepopulate that with the current value. That's a slight behavior change, but I don't expect it to break clients.
qrpike, clarkmcc and bubbajoe