mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 18:25:30 +02:00
MDEV-5764: START SLAVE UNTIL does not work with parallel replication
With parallel replication, there can be any number of events queued on in-memory lists in the worker threads. For normal STOP SLAVE, we want to skip executing any remaining events on those lists and stop as quickly as possible. However, for START SLAVE UNTIL, when the UNTIL position is reached in the SQL driver thread, we must _not_ stop until all already queued events for the workers have been executed - otherwise we would stop too early, before the actual UNTIL position had been completely reached. The code did not handle UNTIL correctly, stopping too early due to not executing the queued events to completion. Fix this, and also implement that an explicit STOP SLAVE in the middle (when the SQL driver thread has reached the UNTIL position but the workers have not) _will_ cause an immediate stop.
This commit is contained in:
parent
e90f68c0ba
commit
641feed481
6 changed files with 52 additions and 10 deletions
|
|
@ -262,6 +262,7 @@ public:
|
|||
*/
|
||||
volatile bool inited;
|
||||
volatile bool abort_slave;
|
||||
volatile bool stop_for_until;
|
||||
volatile uint slave_running;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue