Fix flaky StreamPoolTest.ConcurrentThreadsGetDistinctStreams - #23820
Conversation
The latch only guaranteed that both threads had started, not that both had acquired a pool. Since a pool is created on first use and returned to the free list when its thread exits, a thread that was starved past the other's exit adopted the retired pool and saw the same streams.
|
/ok to test f686451 |
StreamPoolTest.ConcurrentThreadsGetDistinctStreams
|
This can't have an effect on the Please ignore that failure. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe concurrency test now acquires and records each thread’s initial streams before the latch. Comments describe first-use pool creation and retired-pool adoption after thread exit. ChangesStream-pool concurrency test
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This is a localized test synchronization fix with no actionable merge-blocking risk remaining after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
|
/merge |
Description
ConcurrentThreadsGetDistinctStreamsrelied on a latch to keep its two threads overlapping, but the latch only guarantees that both threads have started, not that both have acquired a stream pool.Each thread now takes its pool before waiting on the latch, so both pools are live at the same time.
Checklist