-
Notifications
You must be signed in to change notification settings - Fork 3k
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
op-batcher: Make channel manager safe for concurrent use #6878
Conversation
Because the batcher is concurrent with respect to sending transactions, the main loop would fetch transaction data & record transaction status updates in different go routines. This would lead to concurrent access of the txChannels map which causes a panic. This commit adds locks to the public methods for the channel manager to make it safe for concurrent use. Co-authored-by: bnoieh <135800952+bnoieh@users.noreply.github.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #6878 +/- ##
===========================================
+ Coverage 44.82% 50.74% +5.92%
===========================================
Files 376 314 -62
Lines 29542 23677 -5865
Branches 1692 0 -1692
===========================================
- Hits 13242 12016 -1226
+ Misses 14858 10617 -4241
+ Partials 1442 1044 -398
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
LGTM.
This PR has been added to the merge queue, and will be merged soon. |
This PR is next in line to be merged, and will be merged as soon as checks pass. |
1 similar comment
This PR is next in line to be merged, and will be merged as soon as checks pass. |
This PR is next in line to be merged, and will be merged as soon as checks pass. |
Description
Because the batcher is concurrent with respect to sending transactions, the main loop would fetch transaction data & record transaction status updates in different go routines. This would lead to concurrent access of the txChannels map which causes a panic.
This commit adds locks to the public methods for the channel manager to make it safe for concurrent use.
Reported by bnoeih in #6093
Tests
None.
Metadata