[backport: 17.06] [manager/dispatcher] Replace call to isRunning() to isRunningLocked() in dispatcher Heartbeat()#2715
Merged
Conversation
… in dispatcher Heartbeat() Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
88d33db to
a05ef2d
Compare
Codecov Report
@@ Coverage Diff @@
## bump_v17.06 #2715 +/- ##
===============================================
+ Coverage 60.87% 61.28% +0.41%
===============================================
Files 30 121 +91
Lines 4322 20203 +15881
===============================================
+ Hits 2631 12382 +9751
- Misses 1435 6462 +5027
- Partials 256 1359 +1103 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport of #2664 for 17.06
git cherry-pick -s -S -x caee4da
cherry-pick was not clean.
We noticed repeated CI failures pointing to data races because of unlocked access to the dispatcher context in Heartbeat(). Golang also does not provide any guarantees around read-only operations on objects which are otherwise locked.
This will likely have a performance impact, which we will evaluate and some of the dispatcher code might need to be re-written accordingly. But correctness is first.