Remove unused codepath from HighThroughputExecutor scale_in #3115
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.
The codepath would be used when scale_in is called with:
force=False
max_idletime=None
and would pick blocks from the list of blocks which are currently idle.
This PR removes that unused codepath, merging the choice of forced/non-forced scale-in and idle time specification into a single parameter that indicates "do not scale in blocks that have not been idle this long".
The two remaining cases from force=True/False, max_idletime=None/number are:
This means that the requested number of blocks should be scaled in, even if the blocks are not idle. The use case for this path is "parsl is shutting down, so we need to tidy up everything. If there are tasks still running, we don't care because terminating in-progress tasks is part of parsl shutdown."
This means that the scaling code has decided to apply downwards pressure on the number of blocks: there are more blocks than needed. However, this pressure should not disrupt already running tasks, and it is less urgent to cancel blocks, because the same call will happen every 5 seconds to keep applying that pressure.
Changed Behaviour
This is removing an unused code path, so should not change any user-visible behaviour.
Type of change