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

[DNM]dumpling: Support check keyspace in dumpling #53541

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

Conversation

ystaticy
Copy link
Contributor

@ystaticy ystaticy commented May 24, 2024

What problem does this PR solve?

Issue Number: ref #53542

Problem Summary:

What changed and how does it work?

Check that the keyspace name is consistent between the command line and TiDB.
If they are not equal, panic dumpling task and return panic msg panic: the keyspace name in command line is different from keyspace name in TiDB.

Check List

Tests

  • Manual test (add detailed scripts or steps below)
  1. create keyspace ks1.
  2. start TiDB instance tidb01 and set keyspace-name=ks1.
  3. start dumpling with --keyspace-name ks1, connect to tidb01, dumpling task will success.
    We can see log:
["dumpling using keyspace."] [keyspaceName=ks1]
  1. start dumpling with --keyspace-name ks2, connect to tidb01, dumpling task will failed.
    dumpling will return the keyspace name in command line is different from keyspace name in TiDB.
./dumpling -u root -P 4000 -h 127.0.0.1 --filetype sql -t 1 -L ./dump.log --keyspace-name ks2
panic: the keyspace name in command line is different from keyspace name in TiDB.
  1. start dumpling without --keyspace-name, connect to tidb01, dumpling task will failed.
./dumpling -u root -P 4000 -h 127.0.0.1 --filetype sql -t 1 -L ./dump.log
panic: the keyspace name in command line is different from keyspace name in TiDB.
  1. start TiDB instance tidb02 without keyspace-name

  2. start dumpling without --keyspace-name, connect to tidb02, dumpling task will success.

  3. start dumpling with --keyspace-name ks1, connect to tidb02, dumpling task will failed.

./dumpling -u root -P 4000 -h 127.0.0.1 --filetype sql -t 1 -L ./dump.log --keyspace-name ks1
panic: the keyspace name in command line is different from keyspace name in TiDB.

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.

Support check keyspace in dumpling

Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none component/dumpling This is related to Dumpling of TiDB. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 24, 2024
Copy link

tiprow bot commented May 24, 2024

Hi @ystaticy. 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 May 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 75 lines in your changes missing coverage. Please review.

Project coverage is 74.5009%. Comparing base (9657f06) to head (bc9faa7).
Report is 600 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #53541        +/-   ##
================================================
+ Coverage   74.3925%   74.5009%   +0.1083%     
================================================
  Files          1505       1505                
  Lines        357314     430737     +73423     
================================================
+ Hits         265815     320903     +55088     
- Misses        72175      89930     +17755     
- Partials      19324      19904       +580     
Flag Coverage Δ
integration 49.3638% <0.0000%> (?)
unit 71.3041% <0.0000%> (-1.9520%) ⬇️

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

Components Coverage Δ
dumpling 53.7782% <0.0000%> (-2.5189%) ⬇️
parser ∅ <ø> (∅)
br 50.3858% <ø> (+7.2960%) ⬆️

Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ystaticy ystaticy changed the title dumpling: Support check keyspace in dumpling [DNM]dumpling: Support check keyspace in dumpling May 24, 2024
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Copy link

ti-chi-bot bot commented May 26, 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 assign gmhdbjd for approval. 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

@ystaticy
Copy link
Contributor Author

/test unit-test

Copy link

tiprow bot commented May 26, 2024

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

@disksing
Copy link
Contributor

/ok-to-test

@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 Jul 25, 2024
Copy link

ti-chi-bot bot commented Jul 25, 2024

PR needs rebase.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/dumpling This is related to Dumpling of TiDB. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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.

None yet

2 participants