Skip to content
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

move ipam.subnet.mutex to caller #2571

Merged
merged 1 commit into from
Mar 29, 2023
Merged

move ipam.subnet.mutex to caller #2571

merged 1 commit into from
Mar 29, 2023

Conversation

hongzhen-ma
Copy link
Collaborator

What type of this PR

  • Bug fixes

Which issue(s) this PR fixes:

Fixes #2570

@github-actions
Copy link
Contributor

  • The commit message should provide more context about the changes made in the patch.
  • In the GetPodAddress function of subnet.go, the mutex is removed from the function and moved to the caller. However, the defer subnet.mutex.RUnlock() statement is still inside the function. This will cause a deadlock as the mutex will never be unlocked. The defer statement should also be moved to the caller.

@github-actions
Copy link
Contributor

  • The commit message should provide more context about the changes made in the patch.
  • In the GetPodAddress function of subnet.go, the mutex is removed. This might cause race conditions if multiple goroutines try to access the same subnet at the same time. It's better to keep the mutex and move it to the caller function (GetPodAddress in ipam.go).

@hongzhen-ma hongzhen-ma merged commit 5dce9cd into master Mar 29, 2023
@hongzhen-ma hongzhen-ma deleted the ipam-mutex branch March 29, 2023 09:24
hongzhen-ma added a commit that referenced this pull request Mar 29, 2023
hongzhen-ma added a commit that referenced this pull request Mar 29, 2023
hongzhen-ma added a commit that referenced this pull request Mar 29, 2023
@hongzhen-ma
Copy link
Collaborator Author

已回合 release-1.11 release-1.10 和 release-1.9 分支

zhangzujian added a commit to zhangzujian/kube-ovn that referenced this pull request Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kube-ovn-controller crashes in large-scale stress test
2 participants