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

databendlabs / openraft / 27595431475
87%

Build:
DEFAULT BRANCH: main
Ran 16 Jun 2026 05:09AM UTC
Jobs 1
Files 264
Run time 1min
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

16 Jun 2026 05:01AM UTC coverage: 86.754% (+0.1%) from 86.624%
27595431475

push

github

drmingdrmer
docs: explain committed recovery and Raft::wait_for_recovery

# Summary

Document what happens to the state machine across a restart when `committed`
is not persisted, and how to recover deterministically. The earlier text
assumed a restarted leader rebroadcasts its restored (possibly stale) commit;
that is no longer how the leader behaves, so the explanation is reframed around
the cluster commit as a quorum-established, never-restored recovery signal, and
points to `wait_for_recovery` as the way to wait for recovery on startup.

# Details

- Reframe the reverted-read-on-restart explanation in `log_pointers` and on
  `RaftLogStorage::save_committed`: a node that did not persist `committed`
  recovers only to its last snapshot until it perceives the re-established
  cluster commit and re-applies up to it. Correct the now-false claim that a
  restarted leader broadcasts a stale smaller commit and that waiting for a
  commit message is insufficient. Cross-link `docs::protocol::read` and
  `docs::protocol::commit`.
- Expand `Raft::wait_for_recovery` docs with why it is sound (the `read_log_id`
  argument) and a usage-scope note: call it once after creation to cross a
  restart, not as a per-read primitive — use `ensure_linearizable` for reads.
- Add a "recovering committed state on startup" section to `Raft::new`, and a
  `new` + `wait_for_recovery` snippet at each mention site.

16741 of 19297 relevant lines covered (86.75%)

162688.71 hits per line

Coverage Regressions

Lines Coverage ∆ File
31
92.02
-0.07% openraft/src/core/raft_core.rs
18
93.24
0.25% openraft/src/raft/mod.rs
15
85.15
22.26% openraft/src/metrics/raft_metrics.rs
3
98.74
0.01% openraft/src/engine/handler/replication_handler/mod.rs
3
81.4
0.0% openraft/src/raft/message/append_entries_request.rs
3
97.86
0.03% openraft/src/raft_state/mod.rs
1
83.33
0.0% openraft/src/metrics/serde_instant.rs
1
98.78
-0.07% openraft/src/raft_state/membership_state/mod.rs
1
0.0
0.0% openraft/src/storage/v2/raft_log_storage.rs
Jobs
ID Job ID Ran Files Coverage
1 27595431475.1 16 Jun 2026 05:09AM UTC 264
86.75
GitHub Action Run
Source Files on build 27595431475
  • Tree
  • List 264
  • Changed 23
  • Source Changed 22
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27595431475
  • d5491a13 on github
  • Prev Build on main (#27423417226)
  • Next Build on main (#27700874921)
  • 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