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: fix issue of explain for connection can't show the last query plan (#21242) #21315

Merged
merged 5 commits into from
Nov 26, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #21242 to release-4.0


What problem does this PR solve?

close #21235

This bug is imported by #19296.

As the title said, here is an example:

test> select connection_id();
+---------------------+
| connection_id()     |
+---------------------+
| 5235610488678645763 |
+---------------------+
1 row in set
Time: 0.011s
test> select * from t where a=1;
+---+---+
| a | b |
+---+---+
| 1 | 1 |
+---+---+
1 row in set
Time: 0.012s
test> explain for connection 5235610488678645763;
+-------------+---------+---------+------+---------------+----------------------------------------------------------------+---------------+--------+------+
| id          | estRows | actRows | task | access object | execution info                                                 | operator info | memory | disk |
+-------------+---------+---------+------+---------------+----------------------------------------------------------------+---------------+--------+------+
| Point_Get_1 | 1.00    | 1       | root | table:t       | time:884.141µs, loops:2, Get:{num_rpc:1, total_time:510.211µs} | handle:1      | N/A    | N/A  |
+-------------+---------+---------+------+---------------+----------------------------------------------------------------+---------------+--------+------+

What is changed and how it works?

  1. Keep saving last valid plan when the connection is sleeping.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Side effects

  • Performance regression
    • Consumes more CPU
    • Consumes more MEM

Release note

  • fix issue of explain for connection can't show the last query plan/

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@crazycs520 you're already a collaborator in bot's repo.

@crazycs520
Copy link
Contributor

/merge

@ti-srebot
Copy link
Contributor Author

@crazycs520 Oops! This PR requires at least 1 LGTMs to merge. The current number of LGTM is 0

Copy link
Contributor

@SunRunAway SunRunAway 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 Nov 26, 2020
@crazycs520
Copy link
Contributor

/merge

@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 21287
  • 21003
  • 21171
  • 20919
  • 21211
  • 21298

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 26, 2020
@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 26, 2020
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@ti-srebot merge failed.

Copy link
Contributor

@AilinKid AilinKid 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 status/LGT3 The PR has already had 3 LGTM. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Nov 26, 2020
@crazycs520
Copy link
Contributor

/merge

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot merged commit f567009 into pingcap:release-4.0 Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/can-merge Indicates a PR has been approved by a committer. status/LGT3 The PR has already had 3 LGTM. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants