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: remove useless code #49206

Merged
merged 2 commits into from
Dec 28, 2023

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Dec 6, 2023

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:

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 do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 6, 2023
@hawkingrei hawkingrei added the skip-issue-check Indicates that a PR no need to check linked issue. label Dec 6, 2023
Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Merging #49206 (43d1a10) into master (7c0c01d) will increase coverage by 0.2019%.
Report is 4 commits behind head on master.
The diff coverage is 100.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #49206        +/-   ##
================================================
+ Coverage   70.9128%   71.1148%   +0.2019%     
================================================
  Files          1368       1430        +62     
  Lines        395546     418097     +22551     
================================================
+ Hits         280493     297329     +16836     
- Misses        95394     101978      +6584     
+ Partials      19659      18790       -869     
Flag Coverage Δ
integration 43.9354% <100.0000%> (?)
unit 70.9130% <ø> (+0.0002%) ⬆️

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

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 46.0592% <ø> (-6.7998%) ⬇️

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 6, 2023
@@ -252,11 +252,6 @@ const (
// AnalyzeFlag is set when the statistics comes from analyze.
const AnalyzeFlag = 1
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can mark this as deprecated. It seems that nothing depends on it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Now he is just expressing a placeholder, and there is no other use for it.

Copy link
Member

Choose a reason for hiding this comment

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

Then we can mark it as deprecated. No need to care about it in code.

Copy link
Member Author

Choose a reason for hiding this comment

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

But it has been as flag into the system table. system table is hard to change.

Copy link
Member

Choose a reason for hiding this comment

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

It should be marked as deprecated with Deprecated: the reason why we don't need it. comment syntax instead of removing it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have reuse this variable to replace the magic code.

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
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.

Looks good to me. Thanks! 👍

Copy link

ti-chi-bot bot commented Dec 28, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hi-rustin, 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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 28, 2023
Copy link

ti-chi-bot bot commented Dec 28, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-12-06 07:17:20.216557652 +0000 UTC m=+1598268.881783836: ☑️ agreed by winoros.
  • 2023-12-28 10:52:08.403405341 +0000 UTC m=+1735819.440632262: ☑️ agreed by hi-rustin.

@hawkingrei
Copy link
Member Author

/retest

1 similar comment
@hawkingrei
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 36cafb2 into pingcap:master Dec 28, 2023
17 of 18 checks passed
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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. skip-issue-check Indicates that a PR no need to check linked issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants