databendlabs / openraft

rust raft with improvements
Apache License 2.0
1.41k stars 158 forks source link

Refactor: Add Leader Lease Duration into `RaftState.vote` #1212

Closed drmingdrmer closed 4 months ago

drmingdrmer commented 4 months ago

Changelog

Refactor: Add Leader Lease Duration into RaftState.vote

This commit enhances the management of leader lease durations by integrating them directly into the RaftState.vote structure. Previously, the leader lease was managed separately as a configuration parameter, and RaftState.vote only recorded the timestamp of the last received AppendEntries RPC.


This change is Reviewable