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

executor: make the ParallelApply be safe to be called again after returning empty results #24935

Merged
merged 2 commits into from
Jun 1, 2021

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented May 27, 2021

What problem does this PR solve?

Issue Number: close #24930

Problem Summary: executor: make the ParallelApply be safe to be called again after returning empty results

What is changed and how it works?

When ParallelApply is under TopN, it may be called again after returning empty results and then it will hang forever.
This PR make the ParallelApply be safe to be called again after returning empty results

Please see #24930 for more details.

Check List

Tests

  • Unit test

Release note

  • executor: make the ParallelApply be safe to be called again after returning empty results

@qw4990 qw4990 added type/bugfix This PR fixes a bug. sig/execution SIG execution labels May 27, 2021
@qw4990 qw4990 requested review from XuHuaiyu, wshwsh12 and lzmhhh123 May 27, 2021 11:22
@qw4990 qw4990 requested a review from a team as a code owner May 27, 2021 11:22
@ti-chi-bot ti-chi-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 27, 2021
@ichn-hu ichn-hu mentioned this pull request May 27, 2021
@XuHuaiyu
Copy link
Contributor

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 28, 2021
@XuHuaiyu
Copy link
Contributor

Will this issue be reproduced when using non-parallel apply ?

@qw4990
Copy link
Contributor Author

qw4990 commented May 31, 2021

Will this issue be reproduced when using non-parallel apply ?

No, non-parallel apply is safe in this case.

@qw4990
Copy link
Contributor Author

qw4990 commented May 31, 2021

PTAL @wshwsh12 @lzmhhh123

@XuHuaiyu
Copy link
Contributor

XuHuaiyu commented Jun 1, 2021

/lgtm

@ti-chi-bot
Copy link
Member

@XuHuaiyu: Please use GitHub review feature instead of /lgtm [cancel] when you want to submit review to the pull request.
For how to use GitHub review feature, see also this document provided by GitHub.

For the reason we drop support to the commands, see also this page.
This reply is being used as a temporary reply during the migration of review process and will be removed on July 1st.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • XuHuaiyu
  • wshwsh12

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 1, 2021
@wshwsh12
Copy link
Contributor

wshwsh12 commented Jun 1, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 493407e

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 1, 2021
@ti-chi-bot ti-chi-bot merged commit 48e25cd into pingcap:master Jun 1, 2021
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Jun 1, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-5.0 in PR #25011

ti-chi-bot pushed a commit that referenced this pull request Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-5.0 sig/execution SIG execution size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

a query may hang forever when its plan has a ParallelApply under TopN
5 participants