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

statistics: update stats_history table when it meets duplicate #54315

Merged
merged 4 commits into from
Jul 1, 2024

Conversation

Defined2014
Copy link
Contributor

@Defined2014 Defined2014 commented Jun 28, 2024

What problem does this PR solve?

Issue Number: close #47539

Problem Summary:

What changed and how does it work?

Check List

Tests

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

run SQLs below, no warning msg again.

set tidb_analyze_version = 1;
set tidb_enable_global_index = true;
set global tidb_enable_historical_stats = true;

CREATE TABLE t ( a int, b int, c int default 0)
  PARTITION BY RANGE (a) (
  PARTITION p0 VALUES LESS THAN (10),
  PARTITION p1 VALUES LESS THAN (20),
  PARTITION p2 VALUES LESS THAN (30),
  PARTITION p3 VALUES LESS THAN (40));
INSERT INTO t(a, b) values(1, 1), (2, 2), (3, 3), (15, 15), (25, 25), (35, 35);
ALTER TABLE t ADD UNIQUE INDEX idx(b);
analyze table t;
  • No need to test
    • I checked and no code files have been changed.

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

Copy link

ti-chi-bot bot commented Jun 28, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. labels Jun 28, 2024
@Defined2014 Defined2014 marked this pull request as ready for review June 28, 2024 08:41
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/planner SIG: Planner and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jun 28, 2024
Copy link

tiprow bot commented Jun 28, 2024

Hi @Defined2014. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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.

@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Jun 28, 2024
Copy link

codecov bot commented Jun 28, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 56.4875%. Comparing base (08b7ac6) to head (de8cd7f).
Report is 41 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #54315         +/-   ##
=================================================
- Coverage   74.7550%   56.4875%   -18.2676%     
=================================================
  Files          1522       1649        +127     
  Lines        361455     617885     +256430     
=================================================
+ Hits         270206     349028      +78822     
- Misses        71616     245479     +173863     
- Partials      19633      23378       +3745     
Flag Coverage Δ
integration 37.0528% <0.0000%> (?)
unit 71.7993% <75.0000%> (-1.8477%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9656% <ø> (-2.2339%) ⬇️
parser ∅ <ø> (∅)
br 52.7422% <ø> (+4.8112%) ⬆️

@Defined2014
Copy link
Contributor Author

/retest

@Defined2014
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 29, 2024
@Defined2014 Defined2014 requested a review from mjonss June 29, 2024 08:25
@hawkingrei
Copy link
Member

/retest

Copy link

ti-chi-bot bot commented Jul 1, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 1, 2024
Copy link

ti-chi-bot bot commented Jul 1, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-29 00:53:42.393641872 +0000 UTC m=+1026548.879130706: ☑️ agreed by hawkingrei.
  • 2024-07-01 06:42:41.874967625 +0000 UTC m=+1220288.360456464: ☑️ agreed by winoros.

@ti-chi-bot ti-chi-bot bot merged commit 878fa32 into pingcap:master Jul 1, 2024
23 checks passed
@qw4990 qw4990 added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Jul 8, 2024
@qw4990
Copy link
Contributor

qw4990 commented Jul 8, 2024

/cherry-pick release-7.5

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jul 8, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #54499.

@ti-chi-bot
Copy link
Member

@qw4990: new pull request could not be created: failed to create pull request against pingcap/tidb#release-7.5 from head ti-chi-bot:cherry-pick-54315-to-release-7.5: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ti-chi-bot:cherry-pick-54315-to-release-7.5."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request","status":"422"}

In response to this:

/cherry-pick release-7.5

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.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jul 8, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner 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.

autoanalyze failed when a table has global index, analyze version = 1
5 participants