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

databendlabs / openraft / 18818196201
88%

Build:
DEFAULT BRANCH: main
Ran 26 Oct 2025 12:58PM UTC
Jobs 1
Files 207
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

26 Oct 2025 11:01AM UTC coverage: 91.368% (+0.1%) from 91.246%
18818196201

push

github

drmingdrmer
feat: add I/O flush progress tracking API

Add `watch_log_progress()` and `watch_vote_progress()` APIs to track
when Raft I/O operations are durably written to storage.

The implementation provides two independent progress streams:

- Log progress: Tracks all I/O operations (vote saves and log appends).
  Returns `FlushPoint` containing the vote and last log ID.

- Vote progress: Tracks only vote changes (new term or leader).
  Returns the flushed `Vote`.

Both APIs expose a `WatchProgress` handle with:
- `get()`: Get current progress state immediately
- `wait_until_ge()`: Wait asynchronously until progress reaches threshold

Additionally, add `wait_until()` method to `WatchReceiver` trait that
accepts a closure for custom conditions, complementing `wait_until_ge()`.

Example usage:

```rust
// Wait for a specific log entry to be flushed
let mut log_progress = raft.watch_log_progress();
let target = Some(FlushPoint::new(
    Vote::new_committed(2, node_id),
    Some(LogId::new(LeaderId::new(2, node_id), 100))
));
log_progress.wait_until_ge(&target).await?;
// Now log entry 100 is guaranteed durable

// Track leadership changes
let mut vote_progress = raft.watch_vote_progress();
let current = vote_progress.get();  // Get current vote immediately
let target = Some(Vote::new_committed(3, 0));
vote_progress.wait_until_ge(&target).await?;
// Now term 3 is guaranteed persisted
```

123 of 127 new or added lines in 14 files covered. (96.85%)

12173 of 13323 relevant lines covered (91.37%)

141607.8 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
81.48
-14.17% openraft/src/vote/ref_vote.rs
Jobs
ID Job ID Ran Files Coverage
1 18818196201.1 26 Oct 2025 12:58PM UTC 207
91.37
GitHub Action Run
Source Files on build 18818196201
  • Tree
  • List 207
  • Changed 13
  • Source Changed 11
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #18818196201
  • cddefbd7 on github
  • Prev Build on main (#18816960782)
  • Next Build on main (#18819965423)
  • 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