Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

fix: make reservedResourceAmounts fully goroutine-safe #62

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

sanposhiho
Copy link
Contributor

In reservedResourceAmount, it didn't take any lock before accessing c.cache and it caused concurrent map read and map write.
We can reproduce it with the updated test in pkg/controllers/reserved_resource_amounts_test.go.

Copy link
Collaborator

@shioshiota shioshiota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shioshiota shioshiota merged commit 0d70d5f into everpeace:master Sep 27, 2023
4 checks passed
@github-actions github-actions bot mentioned this pull request Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants