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

metrics,planner: add 'pseudo estimation' reason in the metrics #21911

Merged
merged 6 commits into from
Jan 4, 2021

Conversation

tiancaiamao
Copy link
Contributor

The reason could be 'outdate' or 'nodata'

What problem does this PR solve?

As the title says: add 'pseudo estimation' reason in the metrics.

Problem Summary:

From an ONCALL issue, I find the query plan changes periodically and sometimes uses pseudo statistics and the bad plan makes the whole cluster overload.

image

The statistics data is healthy and not seems to be outdated. So why TiDB use pseudo estimation?

What is changed and how it works?

What's Changed:

Add a 'type' field to the metrics, the value can be 'outdate' or 'nodata'

How it Works:

Modify metrics

screen

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • No code

Release note

  • Add 'pseudo estimation' reason in the grafana metrics

The reason could be 'outdate' or 'nodata'
@tiancaiamao tiancaiamao requested a review from a team as a code owner December 21, 2020 15:13
@tiancaiamao tiancaiamao requested review from eurekaka and removed request for a team December 21, 2020 15:13
Copy link
Contributor

@Reminiscent Reminiscent 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 Dec 22, 2020
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

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Dec 22, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Dec 22, 2020
@tiancaiamao
Copy link
Contributor Author

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 22, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@tiancaiamao merge failed.

@tiancaiamao
Copy link
Contributor Author

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@tiancaiamao merge failed.

@tiancaiamao
Copy link
Contributor Author

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@tiancaiamao merge failed.

@tiancaiamao
Copy link
Contributor Author

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@tiancaiamao merge failed.

@lidezhu
Copy link
Contributor

lidezhu commented Jan 4, 2021

/run-all-tests

@tiancaiamao
Copy link
Contributor Author

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit b45fa8b into pingcap:master Jan 4, 2021
@tiancaiamao tiancaiamao deleted the pseudo-metrics branch January 4, 2021 05:50
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/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants