chore: add retry logic to finalizer operations to prevent update conflicts#1374
chore: add retry logic to finalizer operations to prevent update conflicts#1374rafatio wants to merge 1 commit intokubernetes-csi:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rafatio 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 |
|
Welcome @rafatio! |
|
Hi @rafatio. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR adds retry logic to finalizer operations in the snapshot controller to handle concurrent resource updates gracefully and prevent "object has been modified" errors.
In environments with high concurrency the snapshot controller frequently encounters update conflicts when adding finalizers to VolumeSnapshots and PersistentVolumeClaims. This results in warning events during snapshot creation:
While snapshots eventually succeed after retries at the reconciliation loop level, these errors cause unnecessary event noise and delays.
Solution:
retry.RetryOnConflictto automatically retry on update conflictsWhich issue(s) this PR fixes:
Does this PR introduce a user-facing change?: