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

databendlabs / openraft
88%

Build:
DEFAULT BRANCH: main
Repo Added 15 Oct 2024 03:30AM UTC
Token P5ILmy9rYJlcs7uJCddenHVVu1Bywo1mI regen
Build 383 Last
Files 258
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

LAST BUILD ON BRANCH main
branch: main
CHANGE BRANCH
x
Reset
Sync Branches
  • main
  • release-0.10
  • release-0.9

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

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>`.

129 of 146 new or added lines in 21 files covered. (88.36%)

16 existing lines in 5 files now uncovered.

15856 of 18120 relevant lines covered (87.51%)

146038.44 hits per line

Relevant lines Covered
Build:
Build:
18120 RELEVANT LINES 15856 COVERED LINES
146038.44 HITS PER LINE
Source Files on main
  • Tree
  • List 258
  • Changed 34
  • Source Changed 32
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
22860163403 main 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 ... push 09 Mar 2026 03:14PM UTC drmingdrmer github
87.51
22843283239 main chore: merge CLAUDE.md guidelines from openraft repo Add code quality checks, Makefile targets, git remotes, code organization, and project structure sections from the main openraft repository. push 09 Mar 2026 07:44AM UTC drmingdrmer github
87.6
22842783777 main change: in 0.10.0: convert `RaftLeaderId` generic params `<Term, NID>` to associated types Since Term and NID are always determined by the implementing type, they belong as associated types rather than generic parameters. This simplifies trait bo... push 09 Mar 2026 07:27AM UTC drmingdrmer github
87.62
22836653978 main change: add SM type parameter to Raft<C, SM> for compile-time state machine type safety Previously, Raft::with_state_machine() and external_state_machine_request() erased the SM type via dyn Any and performed runtime downcasting. If the caller sp... push 09 Mar 2026 03:11AM UTC drmingdrmer github
87.58
22817822182 main change: in 0.10.0: replace Responder GAT with ResponderFactory trait for type-level responder selection Rust lacks higher-kinded types, so the previous GAT `type Responder<T>: Responder<Self, T>` cannot be filled by a plain type parameter in gene... push 08 Mar 2026 09:02AM UTC drmingdrmer github
87.58
22799994548 main change: add SM type parameter to Raft<C, SM> for compile-time state machine type safety Previously, Raft::with_state_machine() and external_state_machine_request() erased the SM type via dyn Any and performed runtime downcasting. If the caller sp... push 07 Mar 2026 01:37PM UTC drmingdrmer github
87.6
22723756593 main change: in 0.10.0: `RaftLeaderId<C>` to `RaftLeaderId<Term, NID>` to break circular type dependency `RaftLeaderId` only uses `C::Term` and `C::NodeId` from `RaftTypeConfig`, so replace the single `C` parameter with two independent type parameters... push 05 Mar 2026 03:01PM UTC drmingdrmer github
87.75
22706393071 main fix: check crates.io remote API instead of local index for published versions `cargo info` queries the local registry index cache, which may be stale and incorrectly report a version as published. Query the crates.io REST API directly to get an a... push 05 Mar 2026 07:05AM UTC drmingdrmer github
87.74
22704933508 main chore: bump version to 0.10.0-alpha.15 for pre-release Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> push 05 Mar 2026 06:14AM UTC drmingdrmer github
87.76
22703758386 main refactor: re-export `openraft-rt` as `openraft::rt` and `openraft-macros` as `openraft::macros` Users can now access `openraft_rt` and `openraft_macros` through `openraft` without adding them as separate dependencies. The old `openraft::openraft_... push 05 Mar 2026 05:31AM UTC drmingdrmer github
87.75
See All Builds (383)

Badge your Repo: openraft

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

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

Refresh
  • Settings
  • Repo on GitHub
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