MDEV-27850: rpl_seconds_behind_master_spike debug_sync fix

A debug_sync signal could remain for the SQL thread that should have begun
a wait_for upon seeing a GTID event, but would instead see the old signal
and continue on without waiting. This broke an "idle" condition in
SHOW SLAVE STATUS
which should have automatically negated Seconds_Behind_Master. Instead,
because the SQL thread had already processed the GTID event, it set
sql_thread_caught_up to false, and thereby calculated the value of
Seconds_behind_master, when the test expected 0.

This patch fixes this by resetting the debug_sync state before creating a
new transaction which sends a GTID event to the replica
This commit is contained in:
Brandon Nesterenko 2024-01-26 10:34:40 -07:00
parent e96a05948b
commit 112eb14f7e

View file

@ -132,6 +132,7 @@ while (!$caught_up)
}
sleep 0.1;
}
set debug_sync="RESET";
--enable_query_log
--connection master