Not the answer you need?
Register and ask your own question!

pt-online-schema-change pausing because {something}=0, bug?

Suvorov ArtemSuvorov Artem EntrantInactive User Role Beginner
I run pt-online-schema-change like this:
pt-online-schema-change --alter 'ADD `test` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci' --charset 'utf8' --host 'localhost' --user 'root' --password 'password' --max-load wsrep_flow_control_recv=1,wsrep_local_send_queue=1 --critical-load Threads_running=400 --null-to-not-null --no-check-alter --execute --alter-foreign-keys-method none --force --statistics D=database,t=table

Comand output:
No slaves found. See --recursion-method if host loaclhosthas slaves.
Not checking slave lag because no slaves were found and --check-slave-lag was not specified.
Operation, tries, wait:
analyze_table, 10, 1
copy_rows, 10, 0.25
create_triggers, 10, 1
drop_triggers, 10, 1
swap_tables, 10, 1
update_foreign_keys, 10, 1
Not updating foreign keys because --alter-foreign-keys-method=none. Foreign keys that reference the table will no longer work.
Altering `database`.`table`...
Creating new table...
Created new table database._table_new OK.
Altering new table...
Altered `database`.`_table_new` OK.
2016-08-31T09:54:45 Creating triggers...
2016-08-31T09:54:45 Created triggers OK.
2016-08-31T09:54:45 Copying approximately 85 rows...
Pausing because wsrep_flow_control_recv=0, wsrep_local_send_queue=0.
Pausing because wsrep_flow_control_recv=0, wsrep_local_send_queue=0.
Pausing because wsrep_flow_control_recv=0, wsrep_local_send_queue=0.
Pausing because wsrep_flow_control_recv=0, wsrep_local_send_queue=0.
^C# Exiting on SIGINT.
Not dropping triggers because the tool was interrupted. To drop the triggers, execute:
DROP TRIGGER IF EXISTS `database`.`pt_osc_database_table_del`;
DROP TRIGGER IF EXISTS `database`.`pt_osc_database_table_upd`;
DROP TRIGGER IF EXISTS `database`.`pt_osc_database_table_ins`;
Not dropping the new table `database`.`_table_new` because the tool was interrupted. To drop the new table, execute:
DROP TABLE IF EXISTS `database`.`_table_new`;
# Event Count
# ====== =====
# INSERT 1
`database`.`table` was not altered.

From doc for --max_load "pause if any status variables are higher than their thresholds" - nothing about zero value.

So, how use max_load with variables whitch can take zero value in normal state of db?

I look into source code and found, as i think, reason why this happend:
https://github.com/percona/percona-toolkit/blob/2.2/bin/pt-online-schema-change#L5188
[PHP]if ( !$val || $val >= $self->{max_val_for}->{$var} ) {
$vals_too_high{$var} = $val;
}
[/PHP]
$val - current value of status variable

Comments

  • PeterPeter Percona CEO Percona Moderator Role
    Hi Artem,

    Thank you for taking a time to look into the code! Assuming you're using latest version it would be great if you can report it as a bug https://launchpad.net/percona-toolkit If you already found fix for it feel free to propose the patch!
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.