diff options
author | unknown <knielsen@knielsen-hq.org> | 2014-03-03 12:13:55 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2014-03-03 12:13:55 +0100 |
commit | 641feed481800d9baadc492a293723da274d8ed6 (patch) | |
tree | 780c8e7a63d39a1573c17075ecee423714d38fb0 /sql/rpl_parallel.h | |
parent | e90f68c0ba1802d58b06bc7178513f77b27b662b (diff) | |
download | mariadb-git-641feed481800d9baadc492a293723da274d8ed6.tar.gz |
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.
Diffstat (limited to 'sql/rpl_parallel.h')
-rw-r--r-- | sql/rpl_parallel.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/rpl_parallel.h b/sql/rpl_parallel.h index 90649230f98..31a6a035dd8 100644 --- a/sql/rpl_parallel.h +++ b/sql/rpl_parallel.h @@ -222,7 +222,8 @@ struct rpl_parallel { ~rpl_parallel(); void reset(); rpl_parallel_entry *find(uint32 domain_id); - void wait_for_done(THD *thd); + void wait_for_done(THD *thd, Relay_log_info *rli); + void stop_during_until(); bool workers_idle(); bool do_event(rpl_group_info *serial_rgi, Log_event *ev, ulonglong event_size); |