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

remove sender for coprocessor with small number of tasks #53251

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

you06
Copy link
Contributor

@you06 you06 commented May 14, 2024

What problem does this PR solve?

Issue Number: close #53250

Problem Summary:

When the number of coprocessos tasks is lower than concurrency limitation, wecan simply handle it with worker, which reduce latency form bypassing sender and the channel between sender and worker.

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.

Optimze latency for coprocessor with query over small ranges.

you06 added 2 commits May 14, 2024 15:38
…queries

Signed-off-by: you06 <[email protected]>

fix negative wg counter

Signed-off-by: you06 <[email protected]>

also get token when skip sender

Signed-off-by: you06 <[email protected]>

close resp chan

Signed-off-by: you06 <[email protected]>

fix concurrency issue

Signed-off-by: you06 <[email protected]>

fix panic

Signed-off-by: you06 <[email protected]>

get token non block

Signed-off-by: you06 <[email protected]>
Copy link

ti-chi-bot bot commented May 14, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from you06, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 14, 2024
Copy link

tiprow bot commented May 14, 2024

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

@you06 you06 changed the title impl some coprocessor without sender, which cost less resources for small queries remove sender for coprocessor with small number of tasks May 14, 2024
Signed-off-by: you06 <[email protected]>
Copy link

codecov bot commented May 14, 2024

Codecov Report

Attention: Patch coverage is 91.80328% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 67.4999%. Comparing base (4b91fee) to head (99e4780).
Report is 9 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #53251        +/-   ##
================================================
- Coverage   74.4490%   67.4999%   -6.9491%     
================================================
  Files          1493       1493                
  Lines        356315     427541     +71226     
================================================
+ Hits         265273     288590     +23317     
- Misses        71770     119090     +47320     
- Partials      19272      19861       +589     
Flag Coverage Δ
integration 29.2352% <91.8032%> (?)

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

Components Coverage Δ
dumpling 56.2971% <ø> (ø)
parser ∅ <ø> (∅)
br 46.2380% <ø> (+3.2467%) ⬆️

you06 added 3 commits May 14, 2024 16:42
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
Copy link

ti-chi-bot bot commented May 14, 2024

[FORMAT CHECKER NOTIFICATION]

Notice: To remove the do-not-merge/invalid-title label, please follow title format, for example pkg [, pkg2, pkg3]: what is changed or *: what is changed.

📖 For more info, you can check the "Contribute Code" section in the development guide.

@hawkingrei
Copy link
Member

/ok-to-test

Copy link

tiprow bot commented May 14, 2024

@you06: 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 99e4780 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.

Copy link

ti-chi-bot bot commented May 14, 2024

@you06: 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
idc-jenkins-ci-tidb/unit-test 99e4780 link true /test unit-test

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/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/invalid-title ok-to-test 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.

simplify coprocessor goroutines to reduce latency in ad-hoc like queries
2 participants