Skip to content

v0.9.19

Compare
Choose a tag to compare
@drmingdrmer drmingdrmer released this 10 Jun 15:05
· 289 commits to main since this release

Summary:

  • Improved:
    • 9bfd517f tolerate leader state reversion upon restart.

Detail:

Improved:

  • Improved: 9bfd517f tolerate leader state reversion upon restart; by Zhang Yanpo; 2025-06-10

    When a leader restarted and its log reverted, and tried to re-elect
    itself as leader:

    And when vote request is rejected and see a greater vote,
    it should only update to the non-committed version of the responded vote
    to its local state:

    This prevents a dangerous scenario when state reversion is allowed:

    1. A node was a leader but its state reverted to a previous version;
    2. The node restarts and begins election;
    3. It receives a vote response containing its own previous leader vote;
    4. Without this protection, it would update to that committed vote and
      become leader again;
    5. However, it lacks the necessary logs, causing committed entries to be
      lost or inconsistent;

    By using the non-committed version, we prevent this reverted node from
    becoming leader while still allowing proper vote updates for legitimate
    cases.