Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Fixed
-
None
-
None
-
None
Description
Launchpad: https://bugs.launchpad.net/percona-toolkit/+bug/1618918
Although 0 is normal value for global variable {some_status_variable}, but tool is pausing.
Doc for --max-load say that pt-online-schema-change "pause if any status variables are higher than their thresholds", nothing about zero value.
So, how use --max-load with variables that can take zero value in normal state of db?
I think that trouble in this line of code:
https://github.com/percona/percona-toolkit/blob/2.2/bin/pt-online-schema-change#L5188
pt-online-schema-change --version
pt-online-schema-change 2.2.19
Console command:
pt-online-schema-change --alter 'drop column test' --charset 'utf8' --host 127.0.0.1 --port 32768 --user 'root' --password 'owoxsql' --max-load Threads_running=400,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=test,t=test
Output:
No slaves found. See --recursion-method if host dcc369b9be1d has 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 `test`.`test`...
Creating new table...
Created new table test._test_new OK.
Altering new table...
Altered `test`.`_test_new` OK.
2016-08-31T17:09:45 Creating triggers...
2016-08-31T17:09:45 Created triggers OK.
2016-08-31T17:09:45 Copying approximately 1 rows...
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 `test`.`pt_osc_test_test_del`;
DROP TRIGGER IF EXISTS `test`.`pt_osc_test_test_upd`;
DROP TRIGGER IF EXISTS `test`.`pt_osc_test_test_ins`;
Not dropping the new table `test`.`_test_new` because the tool was interrupted. To drop the new table, execute:
DROP TABLE IF EXISTS `test`.`_test_new`;
- Event Count
- ====== =====
- INSERT 1
`test`.`test` was not altered.