HCD-595: Fix hang due to unflushed partial batches#23
Conversation
WalkthroughThe Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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 |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
HCD-595
Summary
flush_and_sync_grouphanging when recursive async handlers complete after the final flush, leaving partial batches(<
batch_size) unprocessed in batched receiverswait_idlewith a convergence loop that repeatedly flushes and checksis_idle, with a64-iteration safety fuse
batch_size, creating partial batches after the flushRoot Cause
flush_and_sync_groupperformed one final flush then calledwait_idlebatch_size) that were never auto-triggeredwait_idleblocked foreverTest Plan
test_flush_and_sync_group_late_partial_batch_after_recursive_handlersreproduces the hang with a 5-second timeout assertioncargo testpassescargo clippycleanSummary by CodeRabbit
Bug Fixes
Tests