Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: introducing CommittedVote, NonCommittedVote, and RefVote types #1254

Commits on Oct 12, 2024

  1. Refactor: introducing CommittedVote, NonCommittedVote, and RefVote types

    - **Introduce Specialized Vote Types:**
      - Added `CommittedVote` and `NonCommittedVote` to distinguish between votes that have been
        accepted by a quorum and those that have not.
      - Introduced `RefVote` to provide a reference-based representation of votes, facilitating safer
        and more efficient comparisons.
    
    - **Update Vote Management Logic:**
      - Replaced direct usage of `Vote` with `CommittedVote` and `NonCommittedVote` across various
        modules (`heartbeat/worker.rs`, `notification.rs`, `raft_core.rs`, etc.) to enhance type
        safety and clarity.
      - Modified comparison logic to leverage the new vote types, ensuring accurate and meaningful
        ordering based on vote status.
    
    - **Enhance Notification Mechanisms:**
      - Updated notification structures to use the new vote types, improving the accuracy of messages
        related to vote responses and higher votes observed.
    drmingdrmer committed Oct 12, 2024
    Configuration menu
    Copy the full SHA
    39a77dc View commit details
    Browse the repository at this point in the history