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

Update pt-kill Added new features that can support tidb #876

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

suyestyle
Copy link

@suyestyle suyestyle commented Oct 16, 2024

  • The contributed code is licensed under GPL v2.0
  • Contributor Licence Agreement (CLA) is signed
  • util/update-modules has been ran
  • Documentation updated
  • Test suite update

@it-percona-cla
Copy link

it-percona-cla commented Oct 16, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@svetasmirnova svetasmirnova left a comment

Choose a reason for hiding this comment

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

Please add a test case and make "mysql" default value for the "db-type" parameter. You can find an example of how to do it in the definition of option recursion-method for pt-online-schema-change utility.

@suyestyle
Copy link
Author

If you want to add rules to mysql clusters, you can do so

pt-kill --log-dsn D=3306_kill_log,t=99755_r_3306_killsql_log,h=192.168.1.1,P=3307,u=dba,p=password --host=192.168.1.2 --port=3306 --user=dba --password=password --create-log-table --no-version-check  --busy-time=4s --match-command=Query --match-info='SELECT|select|Select' --ignore-user=inception --victim all --interval 1 --kill --db-type=mysql --daemonize

Or do this

pt-kill --log-dsn D=3306_kill_log,t=99755_r_3306_killsql_log,h=192.168.1.1,P=3307,u=dba,p=password --host=192.168.1.2 --port=3306 --user=dba --password=password --create-log-table --no-version-check  --busy-time=4s --match-command=Query --match-info='SELECT|select|Select' --ignore-user=inception --victim all --interval 1 --kill --daemonize

If you want to add rules to tidb clusters, you can do so

pt-kill --log-dsn D=3306_kill_log,t=99755_r_3306_killsql_log,h=192.168.1.1,P=3307,u=dba,p=password --host=192.168.1.2 --port=4001 --user=dba --password=password --create-log-table --no-version-check  --busy-time=4s --match-command=Query --match-info='SELECT|select|Select' --ignore-user=inception --victim all --interval 1 --kill --db-type=tidb --daemonize

Copy link
Collaborator

@svetasmirnova svetasmirnova left a comment

Choose a reason for hiding this comment

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

Please resolve my comments and add a test case. You will find examples in t/pt-kill.

@@ -4,6 +4,7 @@
# See "COPYRIGHT, LICENSE, AND WARRANTY" at the end of this file for legal
# notices and disclaimers.

use DBI;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is auto-generated code. No change should be here.

I also do not understand why you need to explicitly import DBI for the code you propose.


type: string

mysql; tidb
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here should be the default value for mysql. Please check other options where the default value is defined.

@suyestyle
Copy link
Author

How do I provide the use cases you're talking about.

@svetasmirnova
Copy link
Collaborator

@suyestyle Please check CONTRIBUTING.md and files in t/pt-kill.

@suyestyle
Copy link
Author

Thank you for your patience.

I have put my use case in the above answer, is there any problem with this way?

I can't find any use case information here on t/pt-kill, a lot of it is code information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants