Bug #35183 show slave status should include the number of transaction retries
Submitted: 10 Mar 2008 14:53 Modified: 19 Mar 2008 19:42
Reporter: Sven Sandberg Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:5.1 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: replication, retry, rpl_ndb_basic, show slave status, slave_transaction_retries

[10 Mar 2008 14:53] Sven Sandberg
Description:
When a temporary error occurs during replication, the slave retries a pre-defined number of times before failing. The maximum number of retries is defined by @@slave_transaction_retries. If the temporary error remains at this time, we get a real error and the slave stops. If the temporary error disappears, the slave continues to run.

In rpl_ndb_basic.test, we want to test the behavior when a deadlock get resolved after at least one retry. This cannot be done in a safe manner since the number of retries made so far is not exposed to the user. Instead, the test has to use a sleep calibrated to work in most cases with high probability. There is no guarantee that this works.

How to repeat:
Inspect rpl_ndb_basic.test.

Suggested fix:
Add number_of_transaction_retries as a column to show_slave_status.

Add mysql-test/include/wait_for_slave_to_retry.inc, which waits until number_of_transaction_retries is > 0.