-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
mpp: Fix the crash or error when mpp generate empty task list. #31658
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
After you have format title, you can leave a comment |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/c4fedb99a8f3d3175117aded85078d08979db892 |
Could you add some explanations about in what scenarios will the number of mpp tasks be 0, and why it is only a warning instead of error. |
childrenTasks = childrenTasks[0:1] | ||
if len(childrenTasks) > 0 { | ||
childrenTasks = childrenTasks[0:1] | ||
} | ||
} | ||
tasks = e.constructMPPTasksByChildrenTasks(childrenTasks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
early return in constructMPPTasksByChildrenTasks
or at here when childrenTasks
is empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but it seems unnecessary to add these special judgment logics for rare cases?
Why not check the range and for empty range, do not construct mpp task at all? |
Co-authored-by: Fu Zhe <fuzhe1989@gmail.com>
Maintain logic consistency with batch cop requests( |
/run-cherry-picker |
/run-cherry-picker |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.3 in PR #31695 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.2 in PR #31696 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.4 in PR #31697 |
/run-cherry-picker |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.1 in PR #32316 |
/run-cherry-pick |
1 similar comment
/run-cherry-pick |
What problem does this PR solve?
Issue Number: close #31636
Problem Summary: apply may generate an empty range list, and then generate an empty mpp task list, but we don't handle it correctly.
What is changed and how it works?
handle the situation when mpp task list is empty.
Check List
Tests
need add the original case to our intergration cases
Side effects
Documentation
Release note