-
Notifications
You must be signed in to change notification settings - Fork 90
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
core/priority: refactor to fix deadlock #1429
Conversation
Codecov ReportBase: 53.41% // Head: 53.47% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1429 +/- ##
==========================================
+ Coverage 53.41% 53.47% +0.05%
==========================================
Files 145 147 +2
Lines 18193 18349 +156
==========================================
+ Hits 9718 9812 +94
- Misses 7140 7187 +47
- Partials 1335 1350 +15
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
core/priority/prioritiser.go
Outdated
recv.Response <- other.Msg | ||
|
||
recv.Response <- own // Response channel has capacity of 1. | ||
recv.Response = nil // Mark channel as responded.. |
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.
why not close(recv.Response)
to "Mark channel as responded"?
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.
I refactored the whole thing, should be more obvious now.
Refactor priority protocol implementation: - Align with consensus component architecture - Change instance to duty for improve compatibility and logging and simplicity. - Control priority instance with single context, including consensus timeout. category: refactor ticket: #1429
Refactor priority main processing goroutine to fix deadlock when own message is received after and before others.
category: bug
ticket: none