Repository navigation
Conversation
SetApiRouteConfig wrote apiRouteConfigCache under RLock, so a concurrent Dump could fatal with concurrent map iteration and map write. Take Lock instead, matching SetApiCluster. Fixes kmesh-net#1975 Signed-off-by: Krirox <agarwalkrishiv06@gmail.com>
|
Keywords which can automatically close issues and at(@) or hashtag(#) mentions are not allowed in commit messages. The list of commits with invalid commit messages:
DetailsInstructions 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. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
What type of PR is this?
/kind bug
What this PR does / why we need it:
SetApiRouteConfigwroteapiRouteConfigCacheunderRLock.Dumpranges that same map underRLocktoo. Two read locks do not exclude each other, so an RDS update can insert while a dump ranges the map, and Go fatals withconcurrent map iteration and map write.Take
Lockinstead, matchingSetApiCluster.Which issue(s) this PR fixes:
Fixes #1975
Special notes for your reviewer:
Added
TestSetApiRouteConfigConcurrentWithDump(1000 concurrent Set + Dump pairs). Could not rungo test ./pkg/cache/v2in this tree because the embeddedbpf2go.ofiles are not generated; expecting CI to cover it.Does this PR introduce a user-facing change?: