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

planner: display cop tasks when explain format is "dot" #12225

Merged
merged 5 commits into from Sep 18, 2019
Merged

planner: display cop tasks when explain format is "dot" #12225

merged 5 commits into from Sep 18, 2019

Conversation

hailanwhu
Copy link
Contributor

@hailanwhu hailanwhu commented Sep 17, 2019

What problem does this PR solve?

(1) In the physical plan tree, if the top node is a TableReader / IndexLookUpReader / IndexReader, it will not display the cop processes when executing explain format="dot".
(2) Some uses of fmt.Sprintf are not the best way.

What is changed and how it works?

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    (1) create table t(a int, b int, c int);
    (2)explain format="dot" select * from t where a < 2;

Code changes
planner/core/common_plan.go prepareTaskDot()

@sre-bot sre-bot added the contribution This PR is from a community contributor. label Sep 17, 2019
@hailanwhu hailanwhu changed the title fix explain dot bug fix bug in explain dot Sep 17, 2019
@hailanwhu hailanwhu changed the title fix bug in explain dot Fix bug in explain format="dot" Sep 17, 2019
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

Could you add a unit test? BTW, CI is failed.

@hailanwhu
Copy link
Contributor Author

Could you add a unit test? BTW, CI is failed.

Ok, I add it now.

@zz-jason zz-jason added the type/bug-fix This PR fixes a bug. label Sep 17, 2019
@codecov
Copy link

codecov bot commented Sep 17, 2019

Codecov Report

Merging #12225 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master    #12225   +/-   ##
=========================================
  Coverage   81.115%   81.115%           
=========================================
  Files          454       454           
  Lines        98634     98634           
=========================================
  Hits         80007     80007           
  Misses       12865     12865           
  Partials      5762      5762

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added the sig/planner SIG: Planner label Sep 17, 2019
@zz-jason zz-jason changed the title Fix bug in explain format="dot" planner: display cop tasks when explain format is "dot" Sep 17, 2019
@zz-jason zz-jason added needs-cherry-pick-2.1 status/LGT1 Indicates that a PR has LGTM 1. labels Sep 17, 2019
Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

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

LGTM

@eurekaka eurekaka added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 18, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Sep 18, 2019

Your auto merge job has been accepted, waiting for 12250

@sre-bot
Copy link
Contributor

sre-bot commented Sep 18, 2019

/run-all-tests

@sre-bot sre-bot merged commit 96d4b1f into pingcap:master Sep 18, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Sep 18, 2019

cherry pick to release-2.1 failed

@sre-bot
Copy link
Contributor

sre-bot commented Sep 18, 2019

cherry pick to release-3.1 failed

@sre-bot
Copy link
Contributor

sre-bot commented Apr 7, 2020

It seems that, not for sure, we failed to cherry-pick this commit to release-2.1 release-3.0. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @zz-jason PTAL.

@zz-jason
Copy link
Member

zz-jason commented Apr 7, 2020

@hailanwhu Could you help us to cherry-pick this PR to release 3.0, release 3.1 and release 2.1?

@zz-jason
Copy link
Member

zz-jason commented Apr 7, 2020

/run-cherry-picker

sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Apr 7, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Apr 7, 2020

cherry pick to release-2.1 in PR #16121

sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Apr 7, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Apr 7, 2020

cherry pick to release-3.0 in PR #16124

sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Apr 7, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Apr 7, 2020

cherry pick to release-3.1 in PR #16125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor. sig/planner SIG: Planner status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bug-fix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants