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

*: support cancel query like 'select * from information_schema.tables' #57766

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

tiancaiamao
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #57749

Problem Summary:

What changed and how does it work?

Check ctx cancel in the loop.
ListTables might be slow when there are too many tables, add a ctx to it to support cancel.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

image
image

  • 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-triage-completed release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 27, 2024
Copy link

tiprow bot commented Nov 27, 2024

Hi @tiancaiamao. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Nov 27, 2024
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 10 lines in your changes missing coverage. Please review.

Project coverage is 74.7576%. Comparing base (ec8b81b) to head (108cd8d).
Report is 33 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #57766        +/-   ##
================================================
+ Coverage   72.8314%   74.7576%   +1.9261%     
================================================
  Files          1677       1722        +45     
  Lines        463934     476307     +12373     
================================================
+ Hits         337890     356076     +18186     
+ Misses       105166      97931      -7235     
- Partials      20878      22300      +1422     
Flag Coverage Δ
integration 49.3835% <35.0000%> (?)
unit 72.2147% <50.0000%> (-0.0079%) ⬇️

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

Components Coverage Δ
dumpling 52.7673% <ø> (ø)
parser ∅ <ø> (∅)
br 60.4513% <ø> (+14.9190%) ⬆️

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! 👍

@ti-chi-bot ti-chi-bot bot added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 28, 2024
Copy link

ti-chi-bot bot commented Nov 28, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-27 09:11:29.663814421 +0000 UTC m=+627677.283468937: ☑️ agreed by wjhuang2016.
  • 2024-11-28 08:25:52.074176156 +0000 UTC m=+711339.693830671: ☑️ agreed by Rustin170506.

Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Nov 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Rustin170506, wjhuang2016, zimulala

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

Copy link

tiprow bot commented Nov 28, 2024

@tiancaiamao: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
fast_test_tiprow 108cd8d link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@tiancaiamao
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Nov 28, 2024

@tiancaiamao: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@hawkingrei
Copy link
Member

/check-issue-triage-complete

@ti-chi-bot ti-chi-bot bot merged commit ce5ec3f into pingcap:master Nov 28, 2024
26 of 27 checks passed
@tiancaiamao tiancaiamao deleted the cancel-infoschema branch November 28, 2024 13:18
@tiancaiamao tiancaiamao added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Nov 28, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #57806.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner 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.

The KILL statement terminate a system table query connection for long time
6 participants