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

br: add more options for br sql client #53039

Merged
merged 24 commits into from
May 28, 2024
Merged

Conversation

RidRisR
Copy link
Contributor

@RidRisR RidRisR commented May 6, 2024

What problem does this PR solve?

Issue Number: close #53040

Problem Summary:

What changed and how does it work?

We added the following options for br sql client:

the general options are:

ENCRYPTION_METHOD for Encrypt/decrypt method, be one of plaintext|aes128-ctr|aes192-ctr|aes256-ctr case-insensitively, "plaintext" represents no encrypt/decrypt (default "plaintext")

ENCRYPTION_KEYFILE for FilePath, its content is used as the cipher-key

CHECKSUM_CONCURRENCY for The concurrency of checksumming in one table (default 4)

the options for backup are :

IGNORE_STATS for wether ignore backup stats (default true)

COMPRESSION_LEVEL for compression level used for sst file compression

COMPRESSION_TYPE for backup sst file compression algorithm, value can be one of 'lz4|zstd|snappy' (default "zstd")

the options for restore are:

WAIT_TIFLASH_READY for whether wait tiflash replica ready if tiflash exists

WITH_SYS_TABLE for whether restore system privilege tables on default setting (default true)

LOAD_STATS for whether run load stats at end of snapshot restore task (default true)

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.

We added the following options for br sql client:

the general options are:

`ENCRYPTION_METHOD` for Encrypt/decrypt method, be one of plaintext|aes128-ctr|aes192-ctr|aes256-ctr case-insensitively, "plaintext" represents no encrypt/decrypt (default "plaintext")

`ENCRYPTION_KEYFILE` for FilePath, its content is used as the cipher-key

`CHECKSUM_CONCURRENCY` for The concurrency of checksumming in one table (default 4)

the options for backup are :

`IGNORE_STATS` for wether ignore backup stats (default true)

`COMPRESSION_LEVEL` for compression level used for sst file compression

`COMPRESSION_TYPE` for backup sst file compression algorithm, value can be one of 'lz4|zstd|snappy' (default "zstd")

the options for restore are:

`WAIT_TIFLASH_READY` for whether wait tiflash replica ready if tiflash exists

`WITH_SYS_TABLE` for whether restore system privilege tables on default setting (default true)

`LOAD_STATS` for whether run load stats at end of snapshot restore task (default true)```

Copy link

ti-chi-bot bot commented May 6, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/invalid-title do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-tests-checked labels May 6, 2024
@RidRisR RidRisR changed the title Options br: add more options for br sql client May 6, 2024
@RidRisR RidRisR marked this pull request as ready for review May 6, 2024 20:56
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 6, 2024
Copy link

codecov bot commented May 6, 2024

Codecov Report

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

Project coverage is 75.4939%. Comparing base (57d0b40) to head (685776e).
Report is 7 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #53039        +/-   ##
================================================
+ Coverage   72.4916%   75.4939%   +3.0022%     
================================================
  Files          1506       1507         +1     
  Lines        430600     434721      +4121     
================================================
+ Hits         312149     328188     +16039     
+ Misses        99229      86118     -13111     
- Partials      19222      20415      +1193     
Flag Coverage Δ
integration 51.0954% <2.8985%> (?)
unit 71.4007% <66.6666%> (-0.0711%) ⬇️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 61.2578% <66.6666%> (+19.8572%) ⬆️

pkg/executor/brie.go Outdated Show resolved Hide resolved
pkg/executor/brie.go Outdated Show resolved Hide resolved
pkg/executor/brie.go Outdated Show resolved Hide resolved
pkg/parser/keywords.go Outdated Show resolved Hide resolved
pkg/parser/keywords.go Show resolved Hide resolved
@RidRisR
Copy link
Contributor Author

RidRisR commented May 9, 2024

/test unit-test

Copy link

tiprow bot commented May 9, 2024

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

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.

@RidRisR RidRisR requested a review from YuJuncen May 9, 2024 14:42
@RidRisR
Copy link
Contributor Author

RidRisR commented May 9, 2024

/test check-dev2

Copy link

tiprow bot commented May 9, 2024

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

In response to this:

/test check-dev2

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
Contributor

@YuJuncen YuJuncen left a comment

Choose a reason for hiding this comment

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

rest lgtm

pkg/executor/brie_test.go Outdated Show resolved Hide resolved
pkg/executor/brie_test.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label May 11, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels May 11, 2024
@easonn7
Copy link

easonn7 commented May 28, 2024

/approve

Copy link

ti-chi-bot bot commented May 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BornChanger, easonn7, Leavrth, YuJuncen

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 May 28, 2024
@BornChanger
Copy link
Contributor

/retest

Copy link

tiprow bot commented May 28, 2024

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

@ti-chi-bot ti-chi-bot bot merged commit 04cb62d into pingcap:master May 28, 2024
26 checks passed
@RidRisR RidRisR deleted the options branch November 26, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more options for br sql
5 participants