Skip to content

Fix election timeout to reduce conflicts

Compare
Choose a tag to compare
@drmingdrmer drmingdrmer released this 19 Mar 03:30
· 639 commits to main since this release

Improved:

  • Improved: 23f4a73b AppDataResponse does not need a Clone trait bound; by 张炎泼; 2023-03-09

  • Improved: 664635e0 loosen validity check with RaftState.snapshot_last_log_id(); by 张炎泼; 2023-03-10

    A application may not persist snapshot. And when it restarted, the
    last-purged-log-id is not None but snapshot_last_log_id() is None.
    This is a valid state and should not emit error.

  • Improved: 54aea8a2 fix: delay election if a greater last log id is seen; by 张炎泼; 2023-03-14

    If this node sees a greater last-log-id on another node, it will be less
    likely to be elected as a leader.
    In this case, it is necessary to sleep for a longer period of time
    smaller_log_timeout so that other nodes with a greater last-log-id
    have a chance to elect themselves.

Changed:

  • Changed: 9ddb5715 RaftState: make RaftState.vote private. Accesses vote via 2 new public methods: vote_ref() and vote_last_modified().; by 张炎泼; 2023-03-12

  • Changed: 3b4f4e18 move log id related traits to mod openraft::log_id; by 张炎泼; 2023-03-14

    Move trait RaftLogId, LogIdOptionExt and LogIndexOptionExt from openraft::raft_types to mod openraft::log_id