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
Cherry pick of #94389: add lock for csi node update #95057
Conversation
@ping035627: This cherry pick PR is for a release branch and has not yet been approved by Release Managers. To merge this cherry pick, it must first be approved ( AFTER it has been approved by code owners, please ping the kubernetes/release-managers team in a comment to request a cherry pick review. (For details on the patch release process and schedule, see the Patch Releases page.) 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ping035627 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
/test pull-kubernetes-integration |
/assign @vladimirvivien |
@vladimirvivien Hi, can you review this pr? Thanks! |
@@ -175,6 +178,9 @@ func (nim *nodeInfoManager) updateNode(updateFuncs ...nodeUpdateFunc) error { | |||
// the effects of previous updateFuncs to avoid potential conflicts. For example, if multiple | |||
// functions update the same field, updates in the last function are persisted. | |||
func (nim *nodeInfoManager) tryUpdateNode(updateFuncs ...nodeUpdateFunc) error { | |||
nim.lock.Lock() | |||
defer nim.lock.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.
Has this been tested to verify it prevents race conditions ?
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: Closed this PR. 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. |
Cherry pick of #94389 on release-1.18.
#94389: add lock for csi node update
/sig storage
/kind bug