tidb icon indicating copy to clipboard operation
tidb copied to clipboard

WIP: statistics: use correct last update version

Open 0xPoe opened this issue 1 year ago • 2 comments

What problem does this PR solve?

Issue Number: ref https://github.com/pingcap/tidb/issues/50132

Problem Summary:

What changed and how does it work?

There are two versions here:

  1. Version: The last stats update version(count and modify_count).
  2. LastUpdateVersion: The last update time of the histogram. We can take it as the last analysis time.

We should use the second one here instead of the first one.

Check List

Tests

  • [x] 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

0xPoe avatar Feb 23 '24 11:02 0xPoe

Codecov Report

Merging #51287 (61520f7) into master (f4e758a) will decrease coverage by 16.1122%. Report is 2 commits behind head on master. The diff coverage is 100.0000%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #51287         +/-   ##
=================================================
- Coverage   70.6793%   54.5672%   -16.1122%     
=================================================
  Files          1460       1569        +109     
  Lines        434615     603432     +168817     
=================================================
+ Hits         307183     329276      +22093     
- Misses       108242     251231     +142989     
- Partials      19190      22925       +3735     
Flag Coverage Δ
integration 36.6186% <ø> (?)
unit 70.3553% <100.0000%> (-0.1192%) :arrow_down:

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 51.3955% <ø> (+5.5117%) :arrow_up:

codecov[bot] avatar Feb 23 '24 11:02 codecov[bot]

/retest

0xPoe avatar Feb 27 '24 03:02 0xPoe

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, 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~~ [hawkingrei,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[bot] avatar Feb 27 '24 06:02 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2024-02-26 06:03:32.865702133 +0000 UTC m=+855501.613325245: :ballot_box_with_check: agreed by hawkingrei.
  • 2024-02-27 06:13:03.400284551 +0000 UTC m=+942472.147907662: :ballot_box_with_check: agreed by time-and-fate.

ti-chi-bot[bot] avatar Feb 27 '24 06:02 ti-chi-bot[bot]