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

**URL:** <https://forums.percona.com/t/pt-online-schema-change-pausing-because-something-0-bug/5064>\
**Category:** Percona Toolkit\
**Created:** [August 31, 2016, 2:44am UTC](https://forums.percona.com/t/pt-online-schema-change-pausing-because-something-0-bug/5064 "2016-08-31T02:44:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suvorov\_Artem](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@Suvorov\_Artem](https://forums.percona.com/u/Suvorov_Artem)\
**Post date:** [August 31, 2016, 2:44am UTC](https://forums.percona.com/t/pt-online-schema-change-pausing-because-something-0-bug/5064/1 "2016-08-31T02:44:44Z")

</div>

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 [l](http://www.google.com/url?q=http%3A%2F%2Frz-test9.rozetka.ua&sa=D&sntz=1&usg=AFQjCNG8H_CAXX6GubBPGDdyMqMZ3sKCHw)oaclhosthas 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](https://www.percona.com/doc/percona-toolkit/2.1/pt-online-schema-change.html#cmdoption-pt-online-schema-change--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](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

---

<div class="post-metadata">

**Author:** ![Peter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/peter/32/2_2.png) [@Peter](https://forums.percona.com/u/Peter)\
**Post date:** [August 31, 2016, 11:39am UTC](https://forums.percona.com/t/pt-online-schema-change-pausing-because-something-0-bug/5064/2 "2016-08-31T11:39:25Z")

</div>

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 [url][https://launchpad.net/percona-toolkit[/url]](https://launchpad.net/percona-toolkit%5B/url%5D) If you already found fix for it feel free to propose the patch!
