eBay / NuRaft

C++ implementation of Raft core logic as a replication library
Apache License 2.0
1.02k stars 241 forks source link

ServerJoinFailed callback #470

Closed myrrc closed 1 year ago

myrrc commented 1 year ago

If we add_srv, what we can check is that a command was accepted. However, the only way to check whether it was applied is to query replica's config. In case of server not being added (e.g. non-existent host) we will never find this server in a config. This PR proposes a way to handle such corner cases without relying on some arbitrary timeouts

Note we don't need a ServerLeaveFailed callback as a server that fails to be removed gracefully is still removed.