Claude/backpressure repartitionexec jv hp9#20762
Claude/backpressure repartitionexec jv hp9#20762Dandandan wants to merge 4 commits intoapache:mainfrom
Conversation
…or channels Replace the global gate mechanism with per-channel bounded capacity. Each channel independently enforces a buffer limit (CHANNEL_CAPACITY=2), so senders targeting a full channel block without affecting senders to other channels. This eliminates head-of-line blocking and provides more granular backpressure control. https://claude.ai/code/session_01MiFZEjX5FyFwJGAVjv8tJ3
Two issues caused deadlocks with per-channel backpressure: 1. wait_for_task sent completion signals to channels sequentially. If one channel was full, it blocked sending to all remaining channels. Fixed by using futures::future::join_all to send concurrently. 2. Unclaimed output partitions (when only a subset of partitions are executed) would fill to capacity and block senders indefinitely. Fixed by tracking receiver_active state - backpressure is only enforced once the receiver has actively consumed data. Channels with inactive receivers allow unbounded buffering, preventing deadlocks while still providing backpressure for active channels. https://claude.ai/code/session_01MiFZEjX5FyFwJGAVjv8tJ3
|
run benchmarks |
|
🤖 |
|
🤖: Benchmark completed Details
|
|
run benchmarks |
|
🤖 |
|
🤖: Benchmark completed Details
|
Increased the channel capacity from 8 to 16 to improve throughput.
|
run benchmarks |
|
🤖 |
|
🤖: Benchmark completed Details
|
Which issue does this PR close?
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?