-
Notifications
You must be signed in to change notification settings - Fork 902
fix(rpc): concurrent map iteration and write #1650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1650 +/- ##
==========================================
+ Coverage 72.90% 72.94% +0.04%
==========================================
Files 291 291
Lines 21227 21227
==========================================
+ Hits 15475 15484 +9
+ Misses 5003 4994 -9
Partials 749 749
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
way better man thanks! Should we do the same iwth the closeAllSubscribers
function?
That's already done on that function. There's a defer on the unlock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this @GAtom22! 🙏 I do have one question, if I revert the changes in pubsub.go
the test is still passing, is that expected?
@MalteHerrmann It is not deterministic, try running that test many times, it should panic when the concurrent iteration and write occurs |
Description
This PR introduces the changes to solve reported racing conditions on the RPC pubSub logic
Reported issue logs:
Closes #XXX