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

databendlabs / openraft / 19436035039
88%

Build:
DEFAULT BRANCH: main
Ran 17 Nov 2025 04:06PM UTC
Jobs 1
Files 219
Run time 186min
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

17 Nov 2025 03:55PM UTC coverage: 92.164% (-0.03%) from 92.194%
19436035039

push

github

drmingdrmer
change: in 0.10.0: Rename `local_leader_id()` to `as_leader()` returning `Leader` struct

The `as_leader()` method now returns a `Leader` struct containing leader
metadata instead of just the leader ID. This provides richer information
about the leader state, including health indicators.

- Add `Leader` struct with `leader_id`, `last_quorum_acked`
- Add `Leader::leader_id()`, `Leader::term()`, `Leader::to_committed_leader_id()` accessors
- Add `Leader::last_quorum_acked()` to check leader health
- Add `Leader::raft()` to access the `Raft` handle

Upgrade tip:

Replace `local_leader_id()` calls with `as_leader()` and use accessor methods:

For basic leader ID access:
- `raft.local_leader_id()` → `raft.as_leader().map(|l| l.leader_id().clone())`
- `if let Some(id) = raft.local_leader_id()` → `if let Some(leader) = raft.as_leader()`

To access additional leader information:
- `leader.leader_id()` returns `&LeaderIdOf<C>`
- `leader.last_quorum_acked()` returns `Option<InstantOf<C>>`
- `leader.term()` returns `C::Term` (for std LeaderId only)
- `leader.raft()` returns `&Raft<C>`

12 of 25 new or added lines in 2 files covered. (48.0%)

2 existing lines in 2 files now uncovered.

13091 of 14204 relevant lines covered (92.16%)

154294.3 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
91.77
-1.11% openraft/src/raft/mod.rs
10
37.5
openraft/src/raft/leader.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
83.33
0.0% openraft/src/metrics/serde_instant.rs
1
84.71
-0.41% openraft/src/replication/mod.rs
Jobs
ID Job ID Ran Files Coverage
1 19436035039.1 17 Nov 2025 04:06PM UTC 219
92.16
GitHub Action Run
Source Files on build 19436035039
  • Tree
  • List 219
  • Changed 4
  • Source Changed 1
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #19436035039
  • ddcec33a on github
  • Prev Build on main (#19423333880)
  • Next Build on main (#19459132859)
  • 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