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: support capturing to and replaying from shared storage #58862

Merged
merged 6 commits into from
Jan 14, 2025

Conversation

djshow832
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #58861

Problem Summary:
Support writing traffic files to shared storage so that users don't need to copy files from the production cluster to the testing cluster.

What changed and how does it work?

  • For capturing, TiDB assigns each TiProxy a sub-directory under the output path, in the form of tiproxy-0, tiproxy-1, ...
  • For replaying, TiDB reads the sub-directories under the input path and assigns them to TiProxy instances.
  • TiProxy is unaware of the assignment.

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 do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 10, 2025
Copy link

tiprow bot commented Jan 10, 2025

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 Jan 10, 2025

Codecov Report

Attention: Patch coverage is 76.15385% with 31 lines in your changes missing coverage. Please review.

Project coverage is 73.7030%. Comparing base (7479804) to head (dbdf01c).
Report is 43 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58862        +/-   ##
================================================
+ Coverage   73.0869%   73.7030%   +0.6160%     
================================================
  Files          1676       1678         +2     
  Lines        463749     469731      +5982     
================================================
+ Hits         338940     346206      +7266     
+ Misses       103956     102594      -1362     
- Partials      20853      20931        +78     
Flag Coverage Δ
integration 42.9172% <0.0000%> (?)
unit 72.4114% <76.1538%> (+0.1290%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.6820% <ø> (-0.0091%) ⬇️

@djshow832
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jan 10, 2025

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

@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 Jan 10, 2025
@djshow832 djshow832 requested review from bb7133 and xhebox January 10, 2025 10:02
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 13, 2025
pkg/executor/traffic.go Outdated Show resolved Hide resolved
Copy link
Member

@bb7133 bb7133 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 Jan 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, 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 Jan 14, 2025
Copy link

ti-chi-bot bot commented Jan 14, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-13 06:32:18.797814118 +0000 UTC m=+767282.086645819: ☑️ agreed by xhebox.
  • 2025-01-14 08:20:24.5460433 +0000 UTC m=+20296.001089444: ☑️ agreed by bb7133.

@ti-chi-bot ti-chi-bot bot merged commit 6f4861d into pingcap:master Jan 14, 2025
24 checks passed
@djshow832 djshow832 deleted the traffic_s3 branch January 14, 2025 09:51
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. 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.

Support capture to and replay from object storage
3 participants