Skip to content

[rpc] Fix RequestChannel backpressure race - #4024

Open
fxbing wants to merge 1 commit into
apache:mainfrom
fxbing:fix/20260817-request-channel-backpressure-race
Open

[rpc] Fix RequestChannel backpressure race#4024
fxbing wants to merge 1 commit into
apache:mainfrom
fxbing:fix/20260817-request-channel-backpressure-race

Conversation

@fxbing

@fxbing fxbing commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Purpose

Concurrent queue updates can pass the pause or resume pre-check before another thread changes the backpressure state. The stale operation can then acquire the lock and leave autoRead inconsistent with the current queue size.

Brief change log

  • Reconcile queue size and backpressure state under the existing lock when a threshold transition may be needed.
  • Preserve the lock-free fast path and log the queue-size snapshot used for each transition.
  • Normalize zero thresholds and add deterministic regression coverage for stale pause and resume operations.

Tests

  • ./mvnw -pl fluss-rpc -Dtest=RequestChannelTest test — 5 tests passed.
  • ./mvnw -pl fluss-rpc verify — 76 unit tests and 12 integration tests passed.
  • ./mvnw -pl fluss-rpc spotless:check and git diff --check.

API and Format

No public API, configuration, RPC, or storage-format changes.

Documentation

No documentation changes; this is an internal backpressure concurrency fix.

Generative AI disclosure

  • Yes — OpenAI Codex

- Reconcile queue thresholds and backpressure state atomically.
- Add deterministic race and zero-threshold regression coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant