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

stop finding a task if it is canncelled #1778

Merged
merged 3 commits into from
Apr 15, 2021
Merged

Conversation

fzhedu
Copy link
Contributor

@fzhedu fzhedu commented Apr 14, 2021

What problem does this PR solve?

Issue Number: close #1440

Problem Summary:
wait_for will stop until timeout or the lameda function returning true. So when finding a task, if it is cancelled, findTaskWithTimeout should return quickly and return errors, rather than the lameda function returning false and waiting for timeout.

What is changed and how it works?

Proposal: xxx

What's Changed:

Check List

Tests

  • manual test
    the query returns a expected error.
mysql>  SELECT  ( table1 . `col_varchar_binary` , table1 . `col_varchar_binary_not_null_key` )  IN ( SELECT   SUBQUERY1_t2 . `col_varchar_binary_not_null_key` AS SUBQUERY1_field1 , SUM(  SUBQUERY1_t1 . `col_varchar_binary_not_null_key` ) AS SUBQUERY1_field2 FROM ( `K` AS SUBQUERY1_t1 STRAIGHT_JOIN `M` AS SUBQUERY1_t2 ON (SUBQUERY1_t2 . `col_decimal` = SUBQUERY1_t1 . `pk`  ) ) WHERE  SUBQUERY1_t1 . `col_varchar_binary_not_null_key`  IN ( SELECT   CHILD_SUBQUERY1_t1 . `col_varchar_binary_not_null` AS CHILD_SUBQUERY1_field1 FROM `S` AS CHILD_SUBQUERY1_t1 WHERE CHILD_SUBQUERY1_t1 . `col_varchar_binary` != 'a'  ) GROUP BY SUBQUERY1_field1  ) AS field1 ,  table1 . `col_varchar_binary_key` < ALL ( SELECT 'y' UNION DISTINCT SELECT 't' ) AS field2 FROM ( `S` AS table1 RIGHT  JOIN ( ( `II` AS table2 INNER JOIN `EE` AS table3 ON (table3 . `col_decimal_not_null_key` = table2 . `pk`  ) ) ) ON (table3 . `col_varchar_binary_not_null` = table2 . `col_varchar_binary_key`  ) ) WHERE (  table3 . `col_varchar_binary` <= ALL ( SELECT 'c' UNION  SELECT 'c' ) ) OR ( table1 . `col_varchar_binary_key` = 'm' OR table1 . `col_varchar_binary_key` = table2 . `col_varchar_binary_key` )  GROUP BY field1, field2;
ERROR 1105 (HY000): DB::TiFlashException: CastStringAsReal is not supported.

Release note

  • No release note

@fzhedu fzhedu requested a review from windtalker April 14, 2021 14:49
Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 15, 2021
@fzhedu
Copy link
Contributor Author

fzhedu commented Apr 15, 2021

/run-all-tests

@fzhedu
Copy link
Contributor Author

fzhedu commented Apr 15, 2021

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 15, 2021
@ti-srebot
Copy link
Collaborator

Your auto merge job has been accepted, waiting for:

  • 1760

@fzhedu fzhedu removed the status/can-merge Indicates a PR has been approved by a committer. label Apr 15, 2021
@ti-srebot
Copy link
Collaborator

/run-all-tests

@fzhedu
Copy link
Contributor Author

fzhedu commented Apr 15, 2021

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 15, 2021
@ti-srebot
Copy link
Collaborator

/run-all-tests

@ti-srebot
Copy link
Collaborator

@fzhedu merge failed.

@fzhedu
Copy link
Contributor Author

fzhedu commented Apr 15, 2021

/run-all-tests

1 similar comment
@fzhedu
Copy link
Contributor Author

fzhedu commented Apr 15, 2021

/run-all-tests

@fzhedu
Copy link
Contributor Author

fzhedu commented Apr 15, 2021

/merge

@ti-srebot
Copy link
Collaborator

Your auto merge job has been accepted, waiting for:

  • 1760

@ti-srebot
Copy link
Collaborator

/run-all-tests

@ti-srebot
Copy link
Collaborator

@fzhedu merge failed.

@fzhedu
Copy link
Contributor Author

fzhedu commented Apr 15, 2021

/run-all-tests

@windtalker windtalker merged commit 37740f7 into pingcap:master Apr 15, 2021
@fzhedu fzhedu added the needs-cherry-pick-release-5.0 PR which needs to be cherry-picked to release-5.0 label Apr 15, 2021
@fzhedu
Copy link
Contributor Author

fzhedu commented Apr 15, 2021

/run-cherry-picker

@ti-srebot
Copy link
Collaborator

cherry pick to release-5.0 in PR #1784

@fzhedu fzhedu added the type/bugfix This PR fixes a bug. label Apr 15, 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 PR which needs to be cherry-picked to release-5.0 status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Randgen: exchange cannot find task
3 participants