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

Fix a task early termination with group execution #9047

Closed
wants to merge 1 commit into from

Conversation

xiaoxmeng
Copy link
Contributor

A grouped execution task might receive no more splits for all its group before the task startup.
If that happens, the existing no more split function checks if a grouped execution task has finished
execution or not by checking if the total number of finished tasks equals to the total number of tasks (Task::checkNoMoreSplitGroupsLocked). If it equals, then it will terminate the task. If the task
hasn't started, then numDriversPerSplitGroup_ is left as zero, then the task finish condition is always
met and the task is terminated as unexpected.
This PR fixes the issue by checking if numDriversPerSplitGroup_ has been set by task startup or not
under grouped execution mode. It won't check task finish if numDriversPerSplitGroup_ is not set.
Verifies with unit test.

@xiaoxmeng xiaoxmeng marked this pull request as ready for review March 12, 2024 06:57
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 12, 2024
Copy link

netlify bot commented Mar 12, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit deffc3a
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/65effce40df1620008242dd5

@facebook-github-bot
Copy link
Contributor

@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@xiaoxmeng xiaoxmeng requested a review from mbasmanova March 12, 2024 06:58
Copy link
Contributor

@spershin spershin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiaoxmeng
Thanks for catching this corner case!

@facebook-github-bot
Copy link
Contributor

@xiaoxmeng merged this pull request in 86f559c.

@xiaoxmeng xiaoxmeng deleted the terminate branch March 12, 2024 22:25
Joe-Abraham pushed a commit to Joe-Abraham/velox that referenced this pull request Jun 7, 2024
…9047)

Summary:
A grouped execution task might receive no more splits for all its group before the task startup.
If that happens, the existing no more split function checks if a grouped execution task has finished
execution or not by checking if the total number of finished tasks equals to the total number of tasks (Task::checkNoMoreSplitGroupsLocked). If it equals, then it will terminate the task. If the task
hasn't started, then numDriversPerSplitGroup_ is left as zero, then the task finish condition is always
met and the task is terminated as unexpected.
This PR fixes the issue by checking if numDriversPerSplitGroup_ has been set by task startup or not
under grouped execution mode. It won't check task finish if numDriversPerSplitGroup_ is not set.
Verifies with unit test.

Pull Request resolved: facebookincubator#9047

Reviewed By: spershin

Differential Revision: D54792360

Pulled By: xiaoxmeng

fbshipit-source-id: 161439aae2b5659139aff5fdf2bf30740f89bfcb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants