eBay / NuRaft

C++ implementation of Raft core logic as a replication library
Apache License 2.0
993 stars 235 forks source link

Notify user code about follower loss #517

Closed apostolpav113 closed 1 month ago

apostolpav113 commented 2 months ago

Hello, within this PR we suggest to introduce a new cb_func::Type enum item: FollowerLost, and, on detection of follower loss, call the callback function with the type parameter equal to FollowerLost.

Pavel Yurin, C++ developer NXLog Ltd. pavel.yurin@nxlog.org www.nxlog.co

apostolpav113 commented 2 months ago

Thanks for submitting PR. I put a few comments, please take a look.

@greensky00, thank you for the review. I have made the fixes, and regarding this comment https://github.com/eBay/NuRaft/pull/517#discussion_r1654058582 - need one more round of discussion. Please take a look

greensky00 commented 1 month ago

@apostolpav113 Since it has been pending for a while, I made those changes. Please let me know if you have any concerns. You can push follow-up PRs anytime.

apostolpav113 commented 3 weeks ago

greensky00, sorry for delaying and thank you for making the changes! :-) I was going to start fixing today, and was surprised by the fact that PR had been already merged