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

executor, planner: send traffic requests to tiproxy #58006

Merged
merged 7 commits into from
Dec 9, 2024

Conversation

djshow832
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #58005

Problem Summary:
Support traffic capture/replay/cancel statements in the planner and executor.

What changed and how does it work?

  • Support traffic capture/replay/cancel statements. They send requests to all TiProxy instances.
  • Currently, show traffic jobs doesn't return anything. It'll be implemented later.

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 release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed sig/planner SIG: Planner size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 5, 2024
Copy link

tiprow bot commented Dec 5, 2024

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

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

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

Project coverage is 73.8454%. Comparing base (30069c5) to head (29beff7).
Report is 10 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58006        +/-   ##
================================================
+ Coverage   73.1633%   73.8454%   +0.6820%     
================================================
  Files          1674       1675         +1     
  Lines        461261     464236      +2975     
================================================
+ Hits         337474     342817      +5343     
+ Misses       103041     100676      -2365     
+ Partials      20746      20743         -3     
Flag Coverage Δ
integration 43.4535% <0.0000%> (?)
unit 72.5722% <92.4812%> (+0.2825%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 46.0465% <ø> (+0.0391%) ⬆️

@djshow832 djshow832 requested review from xhebox and AilinKid December 5, 2024 10:08
@djshow832
Copy link
Contributor Author

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Dec 5, 2024
@pingcap pingcap deleted a comment from tiprow bot Dec 5, 2024
@pingcap pingcap deleted a comment from tiprow bot Dec 5, 2024
@@ -5827,6 +5829,14 @@ func findStmtAsViewSchema(stmt ast.Node) *ast.SelectStmt {
return nil
}

func (*PlanBuilder) buildTraffic(pc *ast.TrafficStmt) base.Plan {
return &Traffic{
Copy link
Contributor

Choose a reason for hiding this comment

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

4 planner part, LGTM

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 6, 2024
@AilinKid AilinKid added the sig/execution SIG execution label Dec 6, 2024
Copy link

ti-chi-bot bot commented Dec 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, xhebox

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

ti-chi-bot bot commented Dec 9, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-06 07:31:10.119221214 +0000 UTC m=+1399257.738875729: ☑️ agreed by AilinKid.
  • 2024-12-09 03:52:11.834408403 +0000 UTC m=+237721.923210946: ☑️ agreed by xhebox.

@ti-chi-bot ti-chi-bot bot merged commit 53cecc1 into pingcap:master Dec 9, 2024
24 checks passed
@djshow832 djshow832 deleted the traffic_exec branch December 9, 2024 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/execution SIG execution sig/planner SIG: Planner size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Send traffic requests to TiProxy
3 participants