Bug #45423 Configurable Slave SQL Thread Retries
Submitted: 10 Jun 2009 6:55 Modified: 5 May 2010 14:34
Reporter: Mikiya Okuno Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version: OS:Any
Assigned to: Andrei Elkin CPU Architecture:Any

[10 Jun 2009 6:55] Mikiya Okuno
Description:
Slave SQL threads retries a transaction when it rollbacks due to InnoDB deadlock, lock-wait-timeout or temporary NDB errors. It retries internally 10 times according to internal variable, slave_trans_retries. This variable is set to 10, but it cannot be changed using any options. On a busy slaves, users may want to set it to higher values.

Sleeps between each retry should be configurable. Currently, an interval increases gradually from 1 sec to 5 sec, defined as MAX_SLAVE_RETRY_PAUSE. Having a configuration variable instead of MAX_SLAVE_RETRY_PAUSE may come in handy.

How to repeat:
n/a

Suggested fix:
Please add those system variables.
[10 Jun 2009 12:19] MySQL Verification Team
http://dev.mysql.com/doc/refman/5.1/en/replication-options-slave.html#sysvar_slave_transac...

I could set it, and in slave.cc it looks like it's used.

mysql> show global variables like 'slave_transaction_retries';
+---------------------------+-------+
| Variable_name             | Value |
+---------------------------+-------+
| slave_transaction_retries | 1000  |
+---------------------------+-------+
1 row in set (0.00 sec)