xnnyygn / xraft

xnnyygn's raft implementation
MIT License
229 stars 108 forks source link

fix #33 ignore request vote result with lower term #35

Closed meteam2022 closed 1 year ago

meteam2022 commented 1 year ago

Hi there!

I recently noticed the bug (#33) also exists in the develop branch. This bug can also be reproduced as the Raft protocol requires the term check before processing RequestVote. Therefore, I am creating this PR to fix the issue in case people want to learn from the PreVote extension but aren't familiar with the differences between the develop and master branches.

Please let me know if you have any questions or feedback on this fix. Thank you for your time!

xnnyygn commented 1 year ago

I forgot to rebase/merge the change from master to develop. Thanks for reminding me.