• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

databendlabs / openraft / 22860163403 / 1
87%
main: 87%

Build:
DEFAULT BRANCH: main
Ran 09 Mar 2026 03:14PM UTC
Files 258
Run time 8s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Mar 2026 03:11PM UTC coverage: 87.506% (-0.1%) from 87.604%
22860163403.1

push

github

drmingdrmer
change: in 0.10.0: convert `RaftVote` from `RaftVote<C>` to associated type with `type LeaderId`

Decouple `RaftVote` from `RaftTypeConfig` by replacing the `C: RaftTypeConfig`
type parameter with an associated type `LeaderId: RaftLeaderId`. This mirrors
the earlier `RaftLeaderId` refactoring and breaks the circular type dependency
where `RaftTypeConfig` referenced `RaftVote<Self>`.

Internal vote types (`CommittedVote`, `UncommittedVote`, `VoteStatus`, `RefVote`)
are now parameterized by `LID: RaftLeaderId` instead of `C: RaftTypeConfig`,
and `into_vote()` becomes generic over `V: RaftVote<LeaderId = LID>` so callers
choose the concrete vote type without knowing `C`.

Type aliases `CommittedVoteOf<C>`, `UncommittedVoteOf<C>`, `LeaderTerm<LID>`,
`LeaderNodeId<LID>`, and `LeaderCommitted<LID>` are added to keep call sites
concise.

Changes:
- `RaftVote<C>` becomes `RaftVote { type LeaderId: RaftLeaderId }`;
  bound changes from `Vote: RaftVote<Self>` to `Vote: RaftVote<LeaderId = Self::LeaderId>`
- `CommittedVote<C>` / `UncommittedVote<C>` / `VoteStatus<C>` / `RefVote<C>`
  become `<LID>` where `LID: RaftLeaderId`
- `into_vote()` on `CommittedVote` and `UncommittedVote` is now generic:
  `fn into_vote<V: RaftVote<LeaderId = LID>>(self) -> V`

Upgrade tip:

Replace `impl RaftVote<C> for MyVote` with:
    impl RaftVote for MyVote {
        type LeaderId = MyLeaderId;
        // ...
    }

Replace trait bounds `V: RaftVote<C>` with `V: RaftVote<LeaderId = C::LeaderId>`.

15856 of 18120 relevant lines covered (87.51%)

146038.44 hits per line

Source Files on job 22860163403.1
  • Tree
  • List 258
  • Changed 34
  • Source Changed 32
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 22860163403
  • cd9ee654 on github
  • Prev Job for on main (#22843283239.1)
  • Next Job for on main (#22864138805.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc