-
Notifications
You must be signed in to change notification settings - Fork 720
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
rc: fix group change will meet data race #8268
Conversation
Signed-off-by: husharp <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
@@ -129,7 +129,9 @@ func (m *Manager) Init(ctx context.Context) error { | |||
return err | |||
} | |||
// Load resource group meta info from storage. | |||
m.Lock() |
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.
Does it need to be picked to other branches?
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 think so
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8268 +/- ##
==========================================
- Coverage 77.33% 77.31% -0.03%
==========================================
Files 471 471
Lines 61381 61382 +1
==========================================
- Hits 47472 47458 -14
- Misses 10359 10371 +12
- Partials 3550 3553 +3
Flags with carried forward coverage won't be shown. Click here to find out more. |
/test ? |
@HuSharp: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test pull-integration-realcluster-test |
m.groups = make(map[string]*ResourceGroup) | ||
m.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.
Where will it be called concurrently?
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 think because there is no happens-before guarantee for different goroutines, maybe meet memory reordering.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lhy1024, nolouch, rleungx The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/run-cherry-picker |
/run-cherry-picker |
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
close #8267 Signed-off-by: husharp <[email protected]> Co-authored-by: husharp <[email protected]>
close #8267 Signed-off-by: husharp <[email protected]> Co-authored-by: husharp <[email protected]>
close #8267 Signed-off-by: husharp <[email protected]> Co-authored-by: husharp <[email protected]>
What problem does this PR solve?
Issue Number: Close #8267
What is changed and how does it work?
Because there is no happens-before guarantee for different goroutine, maybe meet memory reordering
Check List
Tests
Release note