-
Notifications
You must be signed in to change notification settings - Fork 250
fix(dataprotection): prevent infinite job creation loop during backup foreground deletion #9958
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(dataprotection): prevent infinite job creation loop during backup foreground deletion #9958
Conversation
… foreground deletion When a Backup is deleted using foreground cascading deletion, the garbage collector actively deletes all child resources with blockOwnerDeletion=true. This caused a race condition where: 1. Backup Controller creates a deletion job (with blockOwnerDeletion=true) 2. GC detects the new blocking child resource and deletes it 3. Backup Controller sees the job is missing and creates a new one 4. This creates an infinite loop of job creation/deletion The fix checks if the dataprotection finalizer has already been removed before creating a new deletion job. If the finalizer is gone, the deletion has already succeeded and no new job should be created.
|
Auto Cherry-pick Instructions |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9958 +/- ##
==========================================
- Coverage 51.06% 44.19% -6.88%
==========================================
Files 541 732 +191
Lines 58340 68153 +9813
==========================================
+ Hits 29793 30119 +326
- Misses 25611 35084 +9473
- Partials 2936 2950 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Is it possible to include this PR in the KubeBlocks 0.9.3 release? |
|
@zijiren233 pls accept the license ca |
|
@wangyelei Hi! Thank you for the quick approval; I have signed the license CA. |
|
/cherry-pick release-0.9 |
|
/cherry-pick release-1.0 |
|
🤖 says: cherry pick action finished successfully 🎉! |
|
🤖 says: cherry pick action finished successfully 🎉! |
We will not be overwriting already released versions, this PR will be released in the next version v0.9.6-beta.9. |
When a Backup is deleted using foreground cascading deletion, the garbage collector actively deletes all child resources with blockOwnerDeletion=true. This caused a race condition where:
The fix checks if the dataprotection finalizer has already been removed before creating a new deletion job. If the finalizer is gone, the deletion has already succeeded and no new job should be created.
Note that the difference between foreground cascading deletion and background cascading deletion is that foreground cascading deletion adds the
foregroundDeletionfinalizer to the Backup