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

kv: reduce the distsql concurrency if the runaway query action is COOLDOWN #55310

Merged
merged 4 commits into from
Aug 14, 2024

Conversation

nolouch
Copy link
Member

@nolouch nolouch commented Aug 8, 2024

What problem does this PR solve?

Issue Number: ref #55029

Problem Summary:

Now the effect of COOLDOWN in runaway query is not very significant, and also we meet the big query problem need to reduce the concurrency when executing to smoothly consume the RU, so combine the requirements. optimize the COOLDOWN action by reduce the distsql concurrency.

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.

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 release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 8, 2024
@nolouch nolouch requested review from JmPotato and glorv August 8, 2024 10:16
@nolouch nolouch force-pushed the optimize-cooldown-part1 branch from 1a8f17d to b68a63a Compare August 8, 2024 10:23
Now the effect of COOLDOWN in runaway query is not very significant,
and also we meet the big query problem need to reduce the concurrency
when executing to smoothly consume the RU, so combine the requirement.
optimize the COOLDOWN action by reduce the distsql concurrency.

Signed-off-by: nolouch <[email protected]>
@nolouch nolouch force-pushed the optimize-cooldown-part1 branch from b68a63a to 942fc98 Compare August 8, 2024 10:30
Copy link

codecov bot commented Aug 8, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 75.6299%. Comparing base (9a7e5cc) to head (b4e8c35).
Report is 20 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55310        +/-   ##
================================================
+ Coverage   72.9101%   75.6299%   +2.7197%     
================================================
  Files          1576       1582         +6     
  Lines        440475     447746      +7271     
================================================
+ Hits         321151     338630     +17479     
+ Misses        99538      88426     -11112     
- Partials      19786      20690       +904     
Flag Coverage Δ
integration 77.2630% <60.0000%> (?)
unit 72.0630% <60.0000%> (+0.1125%) ⬆️

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

Components Coverage Δ
dumpling 52.9567% <ø> (ø)
parser ∅ <ø> (∅)
br 62.9683% <ø> (+17.1331%) ⬆️

@nolouch
Copy link
Member Author

nolouch commented Aug 8, 2024

/retest-required

@@ -219,6 +220,15 @@ func (c *CopClient) BuildCopIterator(ctx context.Context, req *kv.Request, vars
it.concurrency = 1
}

// if the request is triggered cool down by the runaway checker, we need to adjust the concurrency, let the sql run slowly.\
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// if the request is triggered cool down by the runaway checker, we need to adjust the concurrency, let the sql run slowly.\
// if the request is triggered cool down by the runaway checker, we need to adjust the concurrency, let the sql run slowly.

Copy link

ti-chi-bot bot commented Aug 12, 2024

@HuSharp: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

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/test-infra repository.

@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2024
@ti-chi-bot ti-chi-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 13, 2024
@nolouch
Copy link
Member Author

nolouch commented Aug 13, 2024

/retest-required

@nolouch
Copy link
Member Author

nolouch commented Aug 13, 2024

PTAL @glorv @JmPotato

Copy link
Member

@JmPotato JmPotato left a comment

Choose a reason for hiding this comment

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

The rest LGTM.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 13, 2024
Signed-off-by: nolouch <[email protected]>
@nolouch
Copy link
Member Author

nolouch commented Aug 14, 2024

ptal @glorv @tangenta

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

ti-chi-bot bot commented Aug 14, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-13 07:42:42.645733684 +0000 UTC m=+253847.349203328: ☑️ agreed by JmPotato.
  • 2024-08-14 05:00:32.933416111 +0000 UTC m=+330517.636885770: ☑️ agreed by glorv.

Copy link

ti-chi-bot bot commented Aug 14, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: glorv, HuSharp, JmPotato, tangenta

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 Aug 14, 2024
@HuSharp
Copy link
Contributor

HuSharp commented Aug 14, 2024

/test unit-test

Copy link

tiprow bot commented Aug 14, 2024

@HuSharp: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test unit-test

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 merged commit c48e53a into pingcap:master Aug 14, 2024
24 checks passed
@nolouch nolouch deleted the optimize-cooldown-part1 branch August 14, 2024 08:03
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/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.

5 participants