mirror of
https://github.com/MariaDB/server.git
synced 2026-04-24 09:15:30 +02:00
MDEV-34355: rpl.rpl_semi_sync_no_missed_ack_after_add_slave ‘server_3 should have sent…’
MDEV-35477 incorrectly reverted the original test fix of MDEV-34355,
thinking it superseded that fix. It is still needed though. Pasting
the content of the original patch’s commit message, as it is still
relevant (and the method to reproduce the test failure still works).
“””
The problem is that the test could query the status variable
Rpl_semi_sync_slave_send_ack before the slave actually updated it.
This would result in an immediate --die assertion killing the rest
of the test. The bottom of this commit message has a small patch
that can be applied to reproduce the test failure.
This patch fixes the test failure by waiting for the variable to be
updated before querying its value.
diff --git a/sql/semisync_slave.cc b/sql/semisync_slave.cc
index 9ddd4c5c8d7..60538079fce 100644
--- a/sql/semisync_slave.cc
+++ b/sql/semisync_slave.cc
@@ -303,7 +303,10 @@ int Repl_semi_sync_slave::slave_reply(Master_info *mi)
reply_res= DBUG_EVALUATE_IF("semislave_failed_net_flush", 1,
net_flush(net));
if (!reply_res)
+ {
+ sleep(1);
rpl_semi_sync_slave_send_ack++;
+ }
}
DBUG_RETURN(reply_res);
}
“””
This commit is contained in:
parent
72e1cc8f52
commit
d77b9a4925
1 changed files with 4 additions and 0 deletions
|
|
@ -86,6 +86,10 @@ if (`SELECT $slave1_sent_ack`)
|
|||
|
||||
--connection server_3
|
||||
--echo # Verifying server_3 did send ACK
|
||||
--let $status_var= Rpl_semi_sync_slave_send_ack
|
||||
--let $status_var_comparsion= >
|
||||
--let $status_var_value= 0
|
||||
--source include/wait_for_status_var.inc
|
||||
--let $slave2_sent_ack= query_get_value(SHOW STATUS LIKE 'rpl_semi_sync_slave_send_ack', Value, 1)
|
||||
if (`SELECT NOT $slave2_sent_ack`)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue