-
Notifications
You must be signed in to change notification settings - Fork 129
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
remove Deadlock from lib/grandpa/message_tracker.go #2923
Conversation
commit tracker and vote tracker
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## development #2923 +/- ##
===============================================
+ Coverage 63.29% 63.36% +0.07%
===============================================
Files 218 218
Lines 27533 27542 +9
===============================================
+ Hits 17426 17453 +27
+ Misses 8495 8480 -15
+ Partials 1612 1609 -3 |
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.
When do you get such deadlock? A bit more context would be nice 😉
EDIT: never mind I'm an idiot, I just read the issue linked 👍
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.
There are no tests related to the commits in the tracker so I would like to suggest adding tests to it
What do you mean? There is There are no tests for the callers of the commits tracker, although I have a local WIP branch with these (waiting for a grandpa refactor and/or something like #2575) |
The message tracker handles vote messages and commit messages, but in the |
Yeah.... That's what I was trying to do a few months ago, but it's kinda of a pain in the ass to write good enough unit tests due to the impl details of the subtrackers (and the unexported fields of the linked lists)... so we would need interfaces... ideally internal subpackages for the 2 trackers and dep inject them to the parent tracker... but then we need #2575 ... anyway probably overthinking it lol... We can for sure make an integration test without too much testing depth. |
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 is included in version 0.7.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
remove common mapLock from map tracker and have two separate locks for commit tracker and vote tracker
Changes
Tests
go test -tags integration github.com/ChainSafe/gossamer
Issues
Fixes #2841
Primary Reviewer
@EclesioMeloJunior