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

server: replace session in statsHistoryHandler with types.Context #56783

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

YangKeao
Copy link
Member

What problem does this PR solve?

Issue Number: close #56782

Problem Summary:

A simple tidy PR, it removes an use of session and replace it with a types.Context.

What changed and how does it work?

Instead of creating a fully functional session, it creates a types.Context instead.

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.
      It has been covered by TestDumpStatsAPI test.

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: Yang Keao <yangkeao@chunibyo.icu>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 22, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 22, 2024
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.6148%. Comparing base (c066620) to head (62cf19d).
Report is 8 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #56783         +/-   ##
=================================================
- Coverage   73.3924%   56.6148%   -16.7777%     
=================================================
  Files          1635       1761        +126     
  Lines        452733     634056     +181323     
=================================================
+ Hits         332272     358970      +26698     
- Misses       100104     250964     +150860     
- Partials      20357      24122       +3765     
Flag Coverage Δ
integration 37.3055% <0.0000%> (?)
unit 72.7353% <100.0000%> (+0.2093%) ⬆️

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

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

@YangKeao
Copy link
Member Author

/retest

Copy link

ti-chi-bot bot commented Oct 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, lcwangchao

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,lcwangchao]

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

ti-chi-bot bot commented Oct 23, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-22 13:21:04.092247848 +0000 UTC m=+357264.789038459: ☑️ agreed by hawkingrei.
  • 2024-10-23 09:26:26.33669729 +0000 UTC m=+429587.033487895: ☑️ agreed by lcwangchao.

@ti-chi-bot ti-chi-bot bot merged commit b759f33 into pingcap:master Oct 23, 2024
23 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Session in StatsHistoryHandler can be replaced by a types.Context.
3 participants