eBay / NuRaft

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

Leader expiration #69

Closed andy-yx-chen closed 5 years ago

andy-yx-chen commented 5 years ago

There is an optimization in cornerstone that introduces leader expiration to prevent a node thinks itself as a leader forever if it's isolated, see this, do you want to port it?

greensky00 commented 5 years ago

Hi @andy-yx-chen , we also have leadership expiration.

Please note that (I remember we also had discussion through e-mail a few months ago), at least in eBay's use cases, just denying requests is not enough. Other service components behave differently according to the role of node (e.g. query type, admin operations), thus leader should step down itself immediately if it detects this kind of isolation.