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

tidb_analyze_version default value is different when upgrade from 4.x and 5.x #25422

Closed
seiya-annie opened this issue Jun 15, 2021 · 6 comments · Fixed by #30743
Closed

tidb_analyze_version default value is different when upgrade from 4.x and 5.x #25422

seiya-annie opened this issue Jun 15, 2021 · 6 comments · Fixed by #30743
Assignees
Labels
severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@seiya-annie
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

upgrade from 4.0.13 to 5.1.0, tidb_analyze_version=2 after upgrade;
upgrade from 5.0.2 to 5.1.0, tidb_analyze_version=1 after upgrade;

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

| Release Version: v5.1.0-20210611
Edition: Community
Git Commit Hash: 29bfbb2
Git Branch: heads/refs/tags/v5.1.0-20210611
UTC Build Time: 2021-06-11 07:52:09
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |

@seiya-annie seiya-annie added the type/bug The issue is confirmed as a bug. label Jun 15, 2021
@aytrack aytrack added the sig/planner SIG: Planner label Jun 15, 2021
@winoros
Copy link
Member

winoros commented Jun 17, 2021

We want the old cluster to keep the original statistics behavior and the new cluster to use the new one. Wait for 1 sprint or 2 to use the new statistics for all clusters by default.
But after some investigation, we find that it's hard to identify the rolling update cluster and the whole new cluster by current code base.
So a not elegant solution is after you upgrade, reset the global tidb_analyze_version to 1.

@lilyjazz
Copy link
Member

lilyjazz commented Jun 19, 2021

What is the influence for users between versions 1 and 2?
Why do we need to keep the tidb_analyze_version version 1 after we have a more accurate way (version 2) to collect data?
@winoros

Is the expected behavior version 1 when upgrading from 4.0.13 to 5.1.0?

@chrysan
Copy link
Contributor

chrysan commented Nov 22, 2021

/assign xuyifangreeneyes

@chrysan
Copy link
Contributor

chrysan commented Nov 22, 2021

/unassign winoros

@xuyifangreeneyes
Copy link
Contributor

#28352 describes the same problem.

@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants