If the resource is already being destroyed, we don't want to hop to the `destroy` label again when the `destroy` semaphore is incremented. We check the current label to avoid hopping again. Sometimes we forget to update the list of labels to check when we add new labels after a destroy. Instead of checking the labels separately, we can increase another semaphore, like `destroying`, along with the `destroy` semaphore and keep it incremented until the resource is destroyed.
11 KiB
11 KiB