-
Notifications
You must be signed in to change notification settings - Fork 6k
test: analyze the tables to stabilize the flaky status of the columns #60514
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
Conversation
Signed-off-by: Rustin170506 <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #60514 +/- ##
================================================
+ Coverage 73.1384% 73.7607% +0.6222%
================================================
Files 1714 1714
Lines 474343 481762 +7419
================================================
+ Hits 346927 355351 +8424
+ Misses 106077 105077 -1000
+ Partials 21339 21334 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…er timing control Signed-off-by: Rustin170506 <[email protected]>
… tests Signed-off-by: Rustin170506 <[email protected]>
/retest |
…Event Signed-off-by: Rustin170506 <[email protected]>
…tests Signed-off-by: Rustin170506 <[email protected]>
…_complex_stats tests Signed-off-by: Rustin170506 <[email protected]>
/test all |
1 similar comment
/test all |
…ions Signed-off-by: Rustin170506 <[email protected]>
/test all |
Signed-off-by: Rustin170506 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (2)
- tests/integrationtest/r/explain_complex_stats.result: Language not supported
- tests/integrationtest/t/explain_complex_stats.test: Language not supported
/test all |
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: time-and-fate, winoros The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #60567
Problem Summary:
What changed and how does it work?
Based on the flaky test results, sometimes the column status is
missing
, and other times it’suninitialized
.This status is generated from here:
tidb/pkg/planner/cardinality/trace.go
Line 203 in a9a8a1b
The root cause is that sometimes the DDL notifier handles the CREATE TABLE DDL event, which triggers the initialization of statistics histograms for all columns, resulting in the column status being
uninitialized
. However, if the DDL notifier hasn’t processed the event yet, the column status remainsmissing
.Since DDL events are handled asynchronously and this is an integration test, there’s no reliable way to stabilize the test by forcing the DDL events to be processed in time.
In this PR, I use the ANALYZE command to explicitly create histogram metadata for all columns, ensuring consistent behavior for the test.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.