Fix IETF subscriber race cancelling groups before consumers attach#1012
Fix IETF subscriber race cancelling groups before consumers attach#1012
Conversation
The Producer/Consumer refactor (a0f55d0) made `unused()` return immediately when consumers == 0 (the initial state). Since GroupProducer/FrameProducer start with 0 consumers—consumers are only created when a downstream publisher calls next_group()—the IETF subscriber's select! with unused() was a race condition that randomly cancelled groups before any data was read. This matches the lite subscriber which already skips these checks with the comment "written to a cache". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
WalkthroughThis change refactors the control flow in the subscriber module by replacing 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Producer/Consumerrefactor (a0f55d06) madeunused()fire immediately whenconsumers == 0, which is the initial state forGroupProducerandFrameProducertokio::select!withunused()was a race condition: groups were randomly cancelled before any downstream publisher could callnext_group()to create a consumercatalog.jsongroups being silently droppedgroup.unused()andframe.unused()checks from the IETF subscriber, matching the lite subscriber which already skips them ("written to a cache")Test plan
just devwith publisher using moq-transport-14 and subscriber using moq-lite-03 — catalog.json should reliably reach the subscriberjust checkto verify no regressions🤖 Generated with Claude Code