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, statistics: dump stats delta before analyze #34895

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

xuyifangreeneyes
Copy link
Contributor

@xuyifangreeneyes xuyifangreeneyes commented May 23, 2022

What problem does this PR solve?

Issue Number: ref #22934

Problem Summary:

What is changed and how it works?

Before executing Analyze, we dump stats delta of the tables that are going to be analyzed. Though it cannot solve the problem in #22934 completely when there are multiple TiDB instances, it can handle the case when insertion and analyze are executed on the same TiDB instance.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

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 release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 23, 2022
@xuyifangreeneyes
Copy link
Contributor Author

/cc @Yisaer @chrysan @winoros

@ti-chi-bot ti-chi-bot requested review from chrysan, winoros and Yisaer May 23, 2022 12:00
@xuyifangreeneyes
Copy link
Contributor Author

/cc @qw4990

@ti-chi-bot ti-chi-bot requested a review from qw4990 May 23, 2022 12:00
@@ -1067,7 +1067,7 @@ func TestQueryFeedbackForPartition(t *testing.T) {
{
// test primary key feedback
sql: "select * from t where t.a <= 5",
hist: "column:1 ndv:2 totColSize:2\n" +
hist: "column:1 ndv:2 totColSize:0\n" +
Copy link
Contributor Author

Choose a reason for hiding this comment

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

After analyze, totColSize is 0. Then it becomes 2 after updating feedback. However, when I dump stats delta before analyze, totColSize is always 0. I'm not very clear why and still investigating it...

@sre-bot
Copy link
Contributor

sre-bot commented May 25, 2022

@zimulala
Copy link
Contributor

/run-mysql-test

@zimulala
Copy link
Contributor

zimulala commented May 25, 2022

PTAL @Yisaer @chrysan @winoros

@Defined2014
Copy link
Contributor

Defined2014 commented May 25, 2022

@xuyifangreeneyes mysql-test still failed. :(

The role file fixed by morgon in the newest master, but index_merge2 still have some problem with explain.

@xuyifangreeneyes
Copy link
Contributor Author

/run-mysql-test

2 similar comments
@xuyifangreeneyes
Copy link
Contributor Author

/run-mysql-test

@xuyifangreeneyes
Copy link
Contributor Author

/run-mysql-test

@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. label May 25, 2022
@xuyifangreeneyes
Copy link
Contributor Author

/run-mysql-test

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 31, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 15, 2022
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 22, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 15, 2022
@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 23, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Apr 23, 2023

PR needs rebase.

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 kubernetes/test-infra repository.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 6, 2023

@xuyifangreeneyes: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-br-integration-test 5009fec link true /test pull-br-integration-test

Full PR test history. Your PR dashboard.

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 kubernetes/test-infra repository. I understand the commands that are listed here.

@ti-chi-bot
Copy link
Member

@xuyifangreeneyes: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-br-integration-test 5009fec link true /test pull-br-integration-test

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 kubernetes/test-infra repository. I understand the commands that are listed here.

@codecov
Copy link

codecov bot commented Jul 22, 2023

Codecov Report

Attention: Patch coverage is 89.28571% with 3 lines in your changes missing coverage. Please review.

Project coverage is 62.7269%. Comparing base (6f18ddc) to head (5009fec).
Report is 8015 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #34895        +/-   ##
================================================
+ Coverage   62.7226%   62.7269%   +0.0042%     
================================================
  Files           848        848                
  Lines        276852     276905        +53     
================================================
+ Hits         173649     173694        +45     
  Misses        89428      89428                
- Partials      13775      13783         +8     

@Rustin170506 Rustin170506 self-assigned this Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants