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

Wait for 10 minutes before the 5th sr-destroy attempt #172

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

stormi
Copy link
Member

@stormi stormi commented Sep 28, 2023

We already have code which retries a failed sr-destroy, when the cause is remaining hidden VDIs which haven't been garbage-collected yet, and it's enough in most cases, but not always.

Sometimes, the force-gc that is triggered by SM before the delete operation is not enough. VDIs that look like they should be removed remain, and are removed only a bit later, when the normal garbage collector runs.

This may be related to the fact that the forced GC operation doesn't coalesce VDIs, or to a special case where a recently coalesced VDI is temporarily protected against deletion.

We add a 10 minutes wait before the 5th sr-destroy attempt, to give the normal garbage collector enough time to run (it should run 5 minutes after the last operation that creates a need for the GC to run).

We already have code which retries a failed sr-destroy, when the cause is
remaining hidden VDIs which haven't been garbage-collected yet, and it's
enough in most cases, but not always.

Sometimes, the force-gc that is triggered by SM before the delete operation
is not enough. VDIs that look like they should be removed remain, and
are removed only a bit later, when the normal garbage collector runs.

This may be related to the fact that the forced GC operation doesn't
coalesce VDIs, or to a special case where a recently coalesced VDI is
temporarily protected against deletion.

We add a 10 minutes wait before the 5th sr-destroy attempt, to give the
normal garbage collector enough time to run (it should run 5 minutes
after the last operation that creates a need for the GC to run).

Signed-off-by: Samuel Verschelde <[email protected]>
@stormi
Copy link
Member Author

stormi commented Sep 28, 2023

The conditions for entering the new code path are not that easy to reproduce, so let's be extra careful in the review.

@stormi stormi merged commit 3da3bdf into master Sep 29, 2023
4 checks passed
@stormi stormi deleted the stormi/give-time-for-GC branch September 29, 2023 15:58
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