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

fix: add lock to avoid concurrent update on the cache #4968

Merged
merged 2 commits into from Nov 17, 2023

Conversation

andyzhangx
Copy link
Member

@andyzhangx andyzhangx commented Nov 9, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

fix: add lock to avoid concurrent update on the cache

find more details here: kubernetes-sigs/azurefile-csi-driver#1556

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

fix: add lock to avoid concurrent update on the cache

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

fix: add lock to avoid concurrent update on the cache

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 9, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 9, 2023
@andyzhangx
Copy link
Member Author

/retest

@MartinForReal
Copy link
Contributor

Cloud object will be removed from csi drivers if we adopt track2 sdk. I'm wondering if there is any other cache implementation in csi driver?

@MartinForReal
Copy link
Contributor

MartinForReal commented Nov 10, 2023

related: #4973

@nilo19
Copy link
Contributor

nilo19 commented Nov 13, 2023

Can you add unit tests to cover the race condition?

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 13, 2023
@andyzhangx
Copy link
Member Author

Can you add unit tests to cover the race condition?

@nilo19 ut added, let's fix it with sdk v1 first, and then port the change to sdk v2

@andyzhangx
Copy link
Member Author

/retest

2 similar comments
@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

pull-cloud-provider-azure-e2e-ccm-capz failed due to capz cluster creation failed, not related to this PR

@andyzhangx
Copy link
Member Author

/retest

2 similar comments
@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/retest

@nilo19
Copy link
Contributor

nilo19 commented Nov 15, 2023

lgtm, please don't forget to squash the commits.

fix

test: add parallel tests
@andyzhangx
Copy link
Member Author

lgtm, please don't forget to squash the commits.

@nilo19 done, there are two commits now: one bug fix and one ut commit.

@andyzhangx
Copy link
Member Author

/retest

5 similar comments
@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/retest

@CecileRobertMichon
Copy link
Contributor

/retest

job should be fixed now

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Nov 16, 2023

@andyzhangx: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cloud-provider-azure-e2e-capz 24417d7 link true /test pull-cloud-provider-azure-e2e-capz

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx andyzhangx merged commit 2cbe82c into kubernetes-sigs:master Nov 17, 2023
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants