fix: Add retry mechanism for status update conflicts in ArksApplicati…#64
Open
LikiosSedo wants to merge 1 commit intoscitix:mainfrom
Open
fix: Add retry mechanism for status update conflicts in ArksApplicati…#64LikiosSedo wants to merge 1 commit intoscitix:mainfrom
LikiosSedo wants to merge 1 commit intoscitix:mainfrom
Conversation
…on and ArksDisaggregatedApplication Wraps Status().Update() calls with retry.RetryOnConflict() to handle concurrent modifications during reconciliation. This prevents 'the object has been modified' errors when users modify resources while the controller is updating status. Controllers fixed: - ArksDisaggregatedApplication: Confirmed production issue with frequent Prefill/Decode tuning - ArksApplication: Same vulnerability pattern with frequent replica/config changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes resource version conflict errors when updating CRD status in high-frequency operation scenarios.
Problem
When users frequently modify Arks resources, the controller logs version conflict errors:
E1029 12:48:01.420297 failed to update status:
"Operation cannot be fulfilled on arksapplications.arks.ai:
the object has been modified; please apply your changes to
the latest version and try again"
Root cause: During controller reconcile (100-500ms), user modifications increment resourceVersion, causing status update with outdated version to fail.
Solution
Wrap
Status().Update()withretry.RetryOnConflict():Changes
Modified 2 controllers to add retry mechanism for status updates:
internal/controller/arksapplication_controller.gointernal/controller/arksdisaggregatedapplication_controller.goImpact
Before: ERROR logs with version conflicts, status updates fail and require automatic requeue
After: Silent automatic retry on conflicts, status updates succeed, no ERROR logs for expected conflicts
Compatibility
No breaking changes, compatible with existing deployments.