MDEV-7391: rpl.rpl_semi_sync, rpl.rpl_semi_sync_after_sync_row fail in buildbot

The problem was caused by a merge error (incorrect conflict resolution) when
the MDEV-7257 patch was merged into 10.1.

The incorrect merge put two code blocks in the wrong order. This caused a race
that was seen as sporadic test failures.

(The problem was that binlog end position was updated before running
after_flush hook; this way it was possible for the binlog dump thread to send
a transaction to a slave without requesting semi-sync acknowledgement. Then
when no acknowledgement was received, semisync replication would be disabled
on the master.)
This commit is contained in:
Kristian Nielsen 2015-01-13 14:18:23 +01:00
parent e695db0f2d
commit 2de9427ccf

View file

@ -6041,14 +6041,6 @@ err:
}
else
{
/* update binlog_end_pos so it can be read by dump thread
*
* note: must be _after_ the RUN_HOOK(after_flush) or else
* semi-sync-plugin might not have put the transaction into
* it's list before dump-thread tries to send it
*/
update_binlog_end_pos(offset);
/* documentation of which mutexes are (not) owned */
mysql_mutex_assert_not_owner(&LOCK_prepare_ordered);
mysql_mutex_assert_owner(&LOCK_log);
@ -6065,6 +6057,14 @@ err:
}
else
{
/* update binlog_end_pos so it can be read by dump thread
*
* note: must be _after_ the RUN_HOOK(after_flush) or else
* semi-sync-plugin might not have put the transaction into
* it's list before dump-thread tries to send it
*/
update_binlog_end_pos(offset);
signal_update();
if ((error= rotate(false, &check_purge)))
check_purge= false;