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: wrong NDV when to merge global stats with index #57269

Merged
merged 4 commits into from
Nov 11, 2024

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Nov 11, 2024

What problem does this PR solve?

Issue Number: close #57264

Problem Summary:

What changed and how does it work?

when we read stats for merge global stats, we forget to force to load fm skretch. so it will lead wrong NDV.

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. do-not-merge/cherry-pick-not-approved size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Nov 11, 2024
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Nov 11, 2024
Copy link
Member

@time-and-fate time-and-fate left a comment

Choose a reason for hiding this comment

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

/hold

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

ti-chi-bot bot commented Nov 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, time-and-fate

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:
  • OWNERS [AilinKid,time-and-fate]

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 Nov 11, 2024
Copy link

ti-chi-bot bot commented Nov 11, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-11 03:47:38.896936763 +0000 UTC m=+241621.087805758: ☑️ agreed by AilinKid.
  • 2024-11-11 04:14:23.231706673 +0000 UTC m=+243225.422575670: ☑️ agreed by time-and-fate.

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (release-6.5@bbf8742). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-6.5     #57269   +/-   ##
================================================
  Coverage               ?   73.6237%           
================================================
  Files                  ?       1097           
  Lines                  ?     352943           
  Branches               ?          0           
================================================
  Hits                   ?     259850           
  Misses                 ?      76370           
  Partials               ?      16723           

@@ -1289,7 +1289,7 @@ func (h *Handle) indexStatsFromStorage(reader *statsReader, row chunk.Row, table
if histID != idxInfo.ID {
continue
}
if idx == nil || idx.LastUpdateVersion < histVer {
Copy link
Member Author

Choose a reason for hiding this comment

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

This logic is the same as column.

@hawkingrei
Copy link
Member 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 Nov 11, 2024
@ti-chi-bot ti-chi-bot bot merged commit 869bae9 into pingcap:release-6.5 Nov 11, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note-none Denotes a PR that doesn't merit a release note. 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.

3 participants