Skip to content

feat: make SPSC disk commit channel capacity configurable - #2981

Merged
oferchen merged 2 commits into
masterfrom
feat/spsc-configurable-capacity
Mar 22, 2026
Merged

oferchen merged 2 commits into
masterfrom
feat/spsc-configurable-capacity

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add channel_capacity field to DiskCommitConfig (default 128)
  • Add effective_channel_capacity() with clamping to [8, 4096]
  • Remove hardcoded CHANNEL_CAPACITY constant from thread.rs
  • Add 8 unit tests for defaults, clamping, boundaries, and custom spawn

Test plan

  • CI passes (fmt, clippy, nextest, all platforms)
  • Existing disk commit tests still pass
  • New clamping tests verify boundary behavior

Add channel_capacity field to DiskCommitConfig with clamping to
[8, 4096]. Default remains 128. Remove hardcoded CHANNEL_CAPACITY
constant from thread.rs.
@github-actions github-actions Bot added the enhancement New feature or request label Mar 22, 2026
@oferchen
oferchen merged commit 1a6fbf3 into master Mar 22, 2026
4 of 9 checks passed
@oferchen
oferchen deleted the feat/spsc-configurable-capacity branch March 22, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant