Skip to content

Conversation

@cbarbian-sap
Copy link
Contributor

@cbarbian-sap cbarbian-sap commented Feb 18, 2025

Previously there was a rare race condition while deleting objects (either during component delete or component apply):

The old logic was:

  1. Delete objects that are are to be deleted (if they are in phase ScheduledForDeletion during apply or if the whole component is being deleted); if successful (that is API server responds with 2xx) then the inventory status of the dependent object is set to Deleting.
  2. Wait until object is gone.

Now, if the object was recreated by someone right between 1. and 2. then the reconciler went stuck.
Note that really does not happen usually (also because the critical period is very, very short).

To overcome, we are now checking the deletion timestamp of the dependent object (if still or again existing). If it has none, then we check the owner; if it is not us, then we give the object up (because apparently, someone else has just recreated it).

@cbarbian-sap cbarbian-sap marked this pull request as draft February 18, 2025 16:40
@cbarbian-sap cbarbian-sap marked this pull request as ready for review February 18, 2025 17:47
@cbarbian-sap cbarbian-sap merged commit 9b53ecf into main Feb 18, 2025
8 checks passed
@cbarbian-sap cbarbian-sap deleted the deletion-recreation branch February 18, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants