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

databendlabs / openraft / 20222136904
88%

Build:
DEFAULT BRANCH: main
Ran 15 Dec 2025 06:04AM UTC
Jobs 1
Files 233
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

15 Dec 2025 05:54AM UTC coverage: 92.71% (+0.07%) from 92.637%
20222136904

push

github

drmingdrmer
feat: add pipeline mode for streaming replication

Implement pipeline replication where the leader continuously streams log
entries to followers after finding the match point, replacing the
request-response pattern with efficient pipelined I/O.

## Replication Phases

Replication to a follower has two phases:

1. **Binary search phase**: The leader runs a binary search to find the exact
   matching position of log entries on the follower.

2. **Pipeline mode**: After finding the match point, the leader calls the
   `stream_append` method on the network and continuously generates
   AppendEntries requests. The network implementation should pipeline all
   requests to the follower and yield responses. Note that responses and
   requests don't have to be 1-to-1 mapped - the number of responses can be
   smaller than the number of requests.

`stream_append` provides a default implementation that calls the existing
`append_entries` method to emulate streaming replication. A mature
implementation should run in real pipeline mode instead of request-response
manner. When a request is received by `stream_append`, it is responsible for
sending all content of the request to the follower - partial success is not
allowed.

## I/O Progress Synchronization

Add watch channels for replication tasks to synchronize with leader I/O
progress:

- `io_accepted_tx`: Notifies observers before I/O operations are submitted to
  storage, enabling preparation for upcoming I/O events
- `io_submitted_tx`: Notifies replication tasks when log entries have been
  submitted to storage and are safe to read

The replication stream monitors these channels to detect leader changes and
wait for log availability without polling.

## Replication Stream Reuse

When rebuilding replication streams after a membership change, reuse existing
streams instead of destroying all and recreating. This avoids unnecessary
stream teardown and maintains in-flight replication state.

- Add `close_old_streams... (continued)

512 of 536 new or added lines in 29 files covered. (95.52%)

9 existing lines in 4 files now uncovered.

14664 of 15817 relevant lines covered (92.71%)

154361.45 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
98.92
10.61% openraft/src/core/heartbeat/worker.rs
1
98.6
-0.43% openraft/src/engine/handler/replication_handler/mod.rs
1
88.37
-0.82% openraft/src/network/v2/network.rs
1
83.49
-1.21% openraft/src/progress/entry/mod.rs
2
93.04
1.49% openraft/src/replication/stream_state.rs
3
96.89
-1.48% openraft/src/replication/mod.rs
3
0.0
0.0% openraft/src/replication/replication_context.rs
6
90.29
-0.17% openraft/src/core/raft_core.rs
6
80.77
-2.56% openraft/src/progress/inflight/mod.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
90.29
-0.17% openraft/src/core/raft_core.rs
2
83.49
-1.21% openraft/src/progress/entry/mod.rs
3
80.77
-2.56% openraft/src/progress/inflight/mod.rs
3
76.47
-8.82% openraft/src/vote/committed.rs
Jobs
ID Job ID Ran Files Coverage
1 20222136904.1 15 Dec 2025 06:04AM UTC 233
92.71
GitHub Action Run
Source Files on build 20222136904
  • Tree
  • List 233
  • Changed 30
  • Source Changed 29
  • Coverage Changed 29
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20222136904
  • 77540a07 on github
  • Prev Build on main (#20218853764)
  • Next Build on main (#20238889404)
  • 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