Uh oh!
There was an error while loading. Please reload this page.
fix(da): serialize subscriber lifecycle transitions - #3430
Conversation
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe subscriber now uses explicit ChangesSubscriber lifecycle serialization
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score:⚪ Minimal · up to The change serializes subscriber start and stop transitions and adds focused concurrency coverage; no actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Overview
Closes#3429
Subscriber.Startpreviously exposed its cancel function before registering the worker goroutines with the WaitGroup.Subscriber.Stopalso cleared that function before the current generation had fully exited.Those orderings allowed
Stopto miss newly registered workers and allowed a new subscriber generation to start while the previous generation was still stopping.This PR serializes the subscriber lifecycle and keeps the stopping state visible until all workers from the current generation have exited.
Changes
Start/Stopcalls safe.Testing
go test ./block/internal/dago test -race ./block/internal/daSummary by CodeRabbit
Bug Fixes
Tests