From a1cfd473469171e5a9700dbff0ee0e1eb84d6312 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 4 Jul 2013 09:20:56 +0200 Subject: MDEV-4506: Parallel replication: Intermediate commit. Wait for all worker threads to finish when stopping the SQL thread. (Only a basic wait; this still needs to be fixed to include timeout logic as in sql_slave_killed()). --- sql/rpl_parallel.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sql/rpl_parallel.h') diff --git a/sql/rpl_parallel.h b/sql/rpl_parallel.h index b0367efdea6..09bde20f5af 100644 --- a/sql/rpl_parallel.h +++ b/sql/rpl_parallel.h @@ -50,6 +50,7 @@ struct rpl_parallel_entry { uint64 last_seq_no; uint64 last_commit_id; bool active; + bool need_signal; rpl_parallel_thread *rpl_thread; /* The sub_id of the last transaction to commit within this domain_id. @@ -57,6 +58,7 @@ struct rpl_parallel_entry { */ uint64 last_committed_sub_id; mysql_mutex_t LOCK_parallel_entry; + mysql_cond_t COND_parallel_entry; uint64 current_sub_id; struct rpl_group_info *current_group_info; }; @@ -67,6 +69,7 @@ struct rpl_parallel { rpl_parallel(); ~rpl_parallel(); rpl_parallel_entry *find(uint32 domain_id); + void wait_for_done(); bool do_event(struct rpl_group_info *serial_rgi, Log_event *ev, THD *thd); }; -- cgit v1.2.1