-
Notifications
You must be signed in to change notification settings - Fork 6.1k
ddl, model: fix unexpected missing analyze for multi schema change (#64337) #65005
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
base: release-8.5
Are you sure you want to change the base?
ddl, model: fix unexpected missing analyze for multi schema change (#64337) #65005
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
@joechenrh This PR has conflicts, I have hold it. |
|
This cherry pick PR is for a release branch and has not yet been approved by triage owners. To merge this cherry pick:
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-sigs/prow repository. |
|
@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide. 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 ti-community-infra/tichi repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
@ti-chi-bot: The following tests failed, say
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-sigs/prow repository. I understand the commands that are listed here. |
This is an automated cherry-pick of #64337
What problem does this PR solve?
Issue Number: ref #63366
Problem Summary:
If the last sub job in the multi schema change doesn't need reorg (i.e., no index involved), the analyze task will be skipped.
Take the following SQL as example, since
c2has no index on it, the state is directly converted toAnalyzeStateSkipped, even if modifyingc1requires reorg.What changed and how does it work?
The problems is caused by inaccurate value for
SubJob.NeedAnalyze. That is, the last job withNeedAnalyze == trueis not the last job that does reorg. To fix this:NeedAnalyzesince it's not accurate.This PR also do the following things
ddltomodelpackage.CtxVarswith boolean value, as it's used byMODIFY COLUMNand store a single bool.auto analyze table all indexes, columns a, b, c,_Col$_c_0 with 256 buckets, 100 topn, 1 samplerateCheck List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.