pt-onine-schema-change is pausing because {some_status_variable}=0

Bug #1618918 reported by ilya
52
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Committed
Medium
Carlos Salguero

Bug Description

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.

Debug output is attached.

Revision history for this message
ilya (i.zaporozhets) wrote :
Artur (artkom)
no longer affects: centos
Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

Thank you for the report.

Verified as described.

sveta@Thinkie:~/build/ps-5.7/mysql-test$ mysqlmtr test -P13001
...

mysql> create table test(id int not null auto_increment primary key, test int);
Query OK, 0 rows affected (0.40 sec)

mysql> insert into test (test) values(1),(2),(3);
Query OK, 3 rows affected (0.12 sec)
Records: 3 Duplicates: 0 Warnings: 0

mysql> \q
Bye

sveta@Thinkie:~/build/ps-5.7/mysql-test$ ~/build/percona-toolkit/bin/pt-online-schema-change --alter 'drop column test' h=127.0.0.1,P=13001,u=root,D=test,t=test --max-load THREADPOOL_IDLE_THREADS=1 --execute
No slaves found. See --recursion-method if host Thinkie 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
Altering `test`.`test`...
Creating new table...
Created new table test._test_new OK.
Altering new table...
Altered `test`.`_test_new` OK.
2016-12-13T15:52:17 Creating triggers...
2016-12-13T15:52:17 Created triggers OK.
2016-12-13T15:52:17 Copying approximately 3 rows...
Pausing because THREADPOOL_IDLE_THREADS=0.
Pausing because THREADPOOL_IDLE_THREADS=0.

Changed in percona-toolkit:
status: New → Confirmed
Changed in percona-toolkit:
status: Confirmed → In Progress
importance: Undecided → Medium
assignee: nobody → Carlos Salguero (carlos-salguero)
milestone: none → 3.0.5
tags: added: pt196
Changed in percona-toolkit:
status: In Progress → Fix Committed
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-708

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers