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

databendlabs / openraft / 26814307926
87%

Build:
DEFAULT BRANCH: main
Ran 02 Jun 2026 10:39AM 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

02 Jun 2026 10:21AM UTC coverage: 86.54% (-0.001%) from 86.541%
26814307926

push

github

drmingdrmer
feat: make client-write batch capacity and linger configurable

# Summary

The API message receiver merges consecutive `ClientWrite` requests into a
single batch before submitting them to storage. The batch size was hardcoded
to 4096 and the receiver never waited for more requests, so on slow or busy
networks throughput suffered from undersized batches. This makes both the
batch capacity and a linger (debounce) window configurable, with linger
defaulting to 0 to preserve the current non-waiting behavior.

# Details

- Add `api_batch_capacity` and `api_batch_linger_ms` to `Config` (also exposed
  as CLI options) so the batch size and the time to wait for additional
  requests can be tuned per deployment.
- The batch receiver now waits up to the linger deadline for each additional
  `ClientWrite` and stops merging once the capacity is reached, the deadline
  expires, or a non-matching message arrives, replacing the previously
  hardcoded batch size of 4096.
- Add `AsyncRuntime::mpsc_recv_timeout_at`, a default trait method that returns
  an immediately available value or waits for one until a deadline; the linger
  wait is built on it.
- `BatchRaftMsgReceiver::try_recv` becomes async to support the timed wait, so
  `raft_core` now awaits it.

- Fix: #1758

83 of 90 new or added lines in 4 files covered. (92.22%)

7 existing lines in 3 files now uncovered.

16376 of 18923 relevant lines covered (86.54%)

144345.7 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
93.15
-0.32% openraft/src/core/merged_raft_msg_receiver.rs
3
59.38
18.2% rt/src/async_runtime.rs

Coverage Regressions

Lines Coverage ∆ File
3
88.89
-3.7% openraft/src/core/sm/handle.rs
2
96.62
-0.97% openraft/src/replication/mod.rs
2
93.28
-1.68% openraft/src/replication/stream_state.rs
Jobs
ID Job ID Ran Files Coverage
1 26814307926.1 02 Jun 2026 10:39AM UTC 264
86.54
GitHub Action Run
Source Files on build 26814307926
  • Tree
  • List 264
  • Changed 9
  • Source Changed 5
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26814307926
  • a8ff29eb on github
  • Prev Build on main (#26807911098)
  • Next Build on main (#26814810383)
  • 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