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

databendlabs / openraft / 18818196199 / 1
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: release-0.10
DEFAULT BRANCH: main
Ran 26 Oct 2025 12:57PM UTC
Files 207
Run time 5s
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.391% (+0.1%) from 91.246%
18818196199.1

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

12176 of 13323 relevant lines covered (91.39%)

141862.13 hits per line

Source Files on job 18818196199.1
  • Tree
  • List 207
  • Changed 14
  • Source Changed 11
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 18818196199
  • cddefbd7 on github
  • Prev Job for on release-0.10 (#18816960782.1)
  • Next Job for on release-0.10 (#18819965420.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