DEVPROD-5584 Generalize dependency bulk query #8200
Merged
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.
DEVPROD-5584
Description
After trying for a while, I wasn't able to reproduce this issue since we do unblock all child dependencies when we restart a task.
The task in the ticket has many other tasks that depend on it, and the check blocked tasks job which runs on a 15 minute cron coincidentally ran within a few seconds of the time that this task was restarted.
One possibility is a race occurred between the check blocked tasks job (which recursively blocks tasks if it finds them in a weird state) and the restart operation (which recursively unblocks child dependency tasks), which at the time of this ticket were both slow operations for large dependency trees.
Since this ticket was created, [DEVPROD-5318] was done to improve the performance of bulk blocking large dependency trees of tasks, and in this PR I've updated the recursive unblocking dependency logic to use the same approach, in case this issue arose due to there being too many dependencies to modify causing slowness.
Testing
Modified unit tests