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

planner: set min for high risk plan steps #56631

Merged
merged 8 commits into from
Oct 29, 2024

Conversation

terry1purcell
Copy link
Contributor

@terry1purcell terry1purcell commented Oct 14, 2024

What problem does this PR solve?

Issue Number: close #55126

Problem Summary:

What changed and how does it work?

Ensure a minimum number of rows and a minimum row size for each plan operation for the optimizer cost model. And ensure that non-index based operations have a minimum of 1 row processed, and row length of at least 2. Index based operations can be fractional (less than 1) due to index probes being averaged out across all outer to inner probes for joins - thus the minimum of 1 row does not apply to index operations due to risk of biasing away from index joins or index merges.

Estimates at zero or below zero are possible in many situations due to realtime insert/update/delete tracking for statistics processing is not transactional (loss of statistics are OK - since it is not user data, and will be corrected next ANALYE). Below zero is rare but possible. In cardinality estimation, zero or near zero it possible due to assumption of independence with multiple predicates or multiple joins, and also with underestimation of any (or many) individual predicate(s).

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. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. sig/planner SIG: Planner size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 14, 2024
Copy link

tiprow bot commented Oct 14, 2024

Hi @terry1purcell. 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.

Copy link

codecov bot commented Oct 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.5613%. Comparing base (1c386db) to head (f129d8b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #56631         +/-   ##
=================================================
- Coverage   73.3473%   56.5613%   -16.7860%     
=================================================
  Files          1638       1764        +126     
  Lines        453782     637559     +183777     
=================================================
+ Hits         332837     360612      +27775     
- Misses       100556     252850     +152294     
- Partials      20389      24097       +3708     
Flag Coverage Δ
integration 37.1791% <100.0000%> (?)
unit 72.5255% <100.0000%> (-0.0362%) ⬇️

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

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

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 14, 2024
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 14, 2024
@terry1purcell
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Oct 14, 2024

@terry1purcell: 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.

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 28, 2024
Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

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

Rest looks good to me

Copy link

ti-chi-bot bot commented Oct 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, qw4990

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 Oct 29, 2024
Copy link

ti-chi-bot bot commented Oct 29, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-28 09:52:40.868654397 +0000 UTC m=+257073.707809942: ☑️ agreed by qw4990.
  • 2024-10-29 16:23:11.30118238 +0000 UTC m=+366904.140337927: ☑️ agreed by AilinKid.

Copy link

tiprow bot commented Oct 29, 2024

@terry1purcell: The following tests 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 865eba1 link true /test fast_test_tiprow
tidb_parser_test 865eba1 link true /test tidb_parser_test

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.

@terry1purcell
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Oct 29, 2024

@terry1purcell: 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.

@terry1purcell
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Oct 29, 2024

@terry1purcell: 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.

@ti-chi-bot ti-chi-bot bot merged commit 8fde2d6 into pingcap:master Oct 29, 2024
21 checks passed
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Oct 29, 2024
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Oct 29, 2024
@ti-chi-bot
Copy link
Member

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

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.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

planner: tot_col_size in mysql.stats_histograms might be a negative number
4 participants