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

*: AnalyzeV2 supports processing special global indexes #56115

Merged
merged 9 commits into from
Sep 25, 2024

Conversation

Defined2014
Copy link
Contributor

@Defined2014 Defined2014 commented Sep 18, 2024

What problem does this PR solve?

Issue Number: close #54233

Problem Summary:

Supports processing global index in analyze version V2. Because the data of the global index is not scattered in every partitions, only one analyze is required for the whole table.

Because we use an independent index analyze task, there will be results of the same version when saving, which needs to be processed like mv index.

After the analysis is complete, the global index will only have global stats.

AutoAnalyze will not process global index, user should trigger it manually.

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • 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

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 18, 2024
Copy link

tiprow bot commented Sep 18, 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.

@Defined2014 Defined2014 changed the title *: analyze supports special global index *: AnalyzeV2 supports processing special global indexes Sep 18, 2024
@Defined2014
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Sep 18, 2024

@Defined2014: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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 Sep 19, 2024
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 93.05556% with 10 lines in your changes missing coverage. Please review.

Project coverage is 76.2802%. Comparing base (2ef0a36) to head (24a40d3).
Report is 178 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #56115        +/-   ##
================================================
+ Coverage   73.4587%   76.2802%   +2.8215%     
================================================
  Files          1605       1627        +22     
  Lines        444802     453922      +9120     
================================================
+ Hits         326746     346253     +19507     
+ Misses        98001      86332     -11669     
- Partials      20055      21337      +1282     
Flag Coverage Δ
integration 52.2146% <88.8888%> (?)
unit 72.7585% <77.7777%> (+0.2147%) ⬆️

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

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 63.1003% <ø> (+17.0827%) ⬆️

Copy link
Member

@Rustin170506 Rustin170506 left a comment

Choose a reason for hiding this comment

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

Thanks!

pkg/planner/core/planbuilder.go Outdated Show resolved Hide resolved
Copy link
Member

@Rustin170506 Rustin170506 left a comment

Choose a reason for hiding this comment

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

rest LGTM

/hold

Feel free to unhold it after you fix them. Or feel free to cc me to look at it again.

pkg/statistics/handle/util/util.go Show resolved Hide resolved
pkg/planner/core/planbuilder.go Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 24, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 24, 2024
Copy link

ti-chi-bot bot commented Sep 24, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-24 09:37:04.507734667 +0000 UTC m=+1558694.248158599: ☑️ agreed by Rustin170506.
  • 2024-09-24 15:37:04.18100501 +0000 UTC m=+1580293.921428951: ☑️ agreed by winoros.

@winoros
Copy link
Member

winoros commented Sep 24, 2024

But don't forget to add the comments requested by Rustin.

@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 25, 2024
Copy link

tiprow bot commented Sep 25, 2024

@Defined2014: 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
fast_test_tiprow 24a40d3 link true /test fast_test_tiprow

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.

@Defined2014
Copy link
Contributor Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 25, 2024
Copy link

ti-chi-bot bot commented Sep 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Rustin170506, tangenta, 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 the approved label Sep 25, 2024
@ti-chi-bot ti-chi-bot bot merged commit 75d9830 into pingcap:master Sep 25, 2024
23 of 25 checks passed
@Defined2014 Defined2014 deleted the fix-54233-2 branch September 25, 2024 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Statistics cannot be generated correctly for a global index that has an expression index
5 participants