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: add the refresher as a stats owner listener #56998

Merged
merged 8 commits into from
Oct 31, 2024

Conversation

Rustin170506
Copy link
Member

What problem does this PR solve?

Issue Number: ref #55906

Problem Summary:

What changed and how does it work?

In this PR, I added the refresher as a listener for the stats owner, to ensure that after a stats owner changes, the background process can stop correctly.

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

Signed-off-by: Rustin170506 <29879298+Rustin170506@users.noreply.github.com>
@ti-chi-bot ti-chi-bot bot added 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. sig/planner SIG: Planner labels Oct 30, 2024
Signed-off-by: Rustin170506 <29879298+Rustin170506@users.noreply.github.com>
Signed-off-by: Rustin170506 <29879298+Rustin170506@users.noreply.github.com>
@Rustin170506
Copy link
Member Author

/retest

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.2302%. Comparing base (248000c) to head (f157db7).
Report is 14 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #56998         +/-   ##
=================================================
- Coverage   73.2196%   57.2302%   -15.9894%     
=================================================
  Files          1650       1801        +151     
  Lines        455460     644306     +188846     
=================================================
+ Hits         333486     368738      +35252     
- Misses       101497     250307     +148810     
- Partials      20477      25261       +4784     
Flag Coverage Δ
integration 39.3992% <72.4137%> (?)
unit 72.5838% <100.0000%> (+0.0831%) ⬆️

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

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

Signed-off-by: Rustin170506 <29879298+Rustin170506@users.noreply.github.com>
Signed-off-by: Rustin170506 <29879298+Rustin170506@users.noreply.github.com>
Signed-off-by: Rustin170506 <29879298+Rustin170506@users.noreply.github.com>
@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 30, 2024
Copy link
Member Author

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

🔢 Self-check (PR reviewed by myself and ready for feedback.)

Copy link
Member Author

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

🔢 Self-check (PR reviewed by myself and ready for feedback.)

Signed-off-by: Rustin170506 <29879298+Rustin170506@users.noreply.github.com>
@Rustin170506 Rustin170506 requested review from lance6716, qw4990 and AilinKid and removed request for qw4990 October 30, 2024 10:10
@Rustin170506
Copy link
Member Author

/retest

Copy link
Contributor

@lance6716 lance6716 left a comment

Choose a reason for hiding this comment

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

lgtm for non-stats part

pkg/statistics/handle/types/interfaces.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 31, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 31, 2024
Copy link

ti-chi-bot bot commented Oct 31, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-31 04:07:18.984215933 +0000 UTC m=+495551.823371472: ☑️ agreed by lance6716.
  • 2024-10-31 06:37:02.448857601 +0000 UTC m=+504535.288013132: ☑️ agreed by D3Hunter.

Copy link

ti-chi-bot bot commented Oct 31, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, D3Hunter, lance6716

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 Oct 31, 2024
Signed-off-by: Rustin170506 <29879298+Rustin170506@users.noreply.github.com>
@ti-chi-bot ti-chi-bot bot merged commit a22fc59 into pingcap:master Oct 31, 2024
25 checks passed
@Rustin170506 Rustin170506 deleted the rustin-patch-pq-listener branch October 31, 2024 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm 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.

4 participants