libraft
libraft copied to clipboard
Channels with no activity should be closed
Right now it's possible for an inactive connection to RaftNetworkClient to persist forever. While this isn't a serious issue, it would be better to have a timeout that closes the channel if there is no network activity greater than a timeout..
I wonder if I need heartbeats at the RaftNetworkClient
level. Also, in the interest of bounding work, it would probably be useful for RaftAlgorithm
to know that it can't reach peers in the cluster to avoid the work of looking up log entries and serializing heartbeats. The downside is that suddenly I have the concept of online/offline state associated with each cluster member. Ugh.