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.
This PR brings in a number of changes. The largest of which is the refactor of the pool manager loop. The large loop that launches various operations at different intervals has been replaced with more granular individual loops for those same operations.
The consolidate loop has been split into 4 individual loops. The rest of the operations also have their own loop. This means that each operation is now self contained and will not be delayed by other operations that may take a long time.
To address potential race conditions there is now a global lock per runner that is grabbed before a potentially long operation is about to be executed. For example, adding pending instances or removing instances that are in
pending_delete
will first acquire a lock for that instance.Given that we now have locks for such operations, we no longer wait for instance creation to finish before returning from
addPendingInstances()
ordeletePendingInstances()
.Other changes include: