summaryrefslogtreecommitdiff
path: root/sql/rpl_parallel.h
diff options
context:
space:
mode:
authorKristian Nielsen <knielsen@knielsen-hq.org>2015-03-11 09:18:16 +0100
committerKristian Nielsen <knielsen@knielsen-hq.org>2015-03-11 09:18:16 +0100
commited04c40b01c122436eda6552c550d62ce8a3920b (patch)
treeb36044637c34b07c0528f82c8a238fdb868ea1ab /sql/rpl_parallel.h
parenta7fd11b31d52b62ef7b61783bb83a5e62271307b (diff)
downloadmariadb-git-ed04c40b01c122436eda6552c550d62ce8a3920b.tar.gz
MDEV-5289: master server starts slave parallel threads
Delay spawning parallel replication worker threads until a slave SQL thread is running, and de-spawn them when the last SQL thread stops. This is especially useful to avoid needless threads on a master in a setup where same my.cnf is used on masters and slaves.
Diffstat (limited to 'sql/rpl_parallel.h')
-rw-r--r--sql/rpl_parallel.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/rpl_parallel.h b/sql/rpl_parallel.h
index d60b2200c17..00421d6f5c9 100644
--- a/sql/rpl_parallel.h
+++ b/sql/rpl_parallel.h
@@ -204,7 +204,6 @@ struct rpl_parallel_thread_pool {
struct rpl_parallel_thread *free_list;
mysql_mutex_t LOCK_rpl_thread_pool;
mysql_cond_t COND_rpl_thread_pool;
- bool changing;
bool inited;
rpl_parallel_thread_pool();
@@ -314,9 +313,8 @@ struct rpl_parallel {
extern struct rpl_parallel_thread_pool global_rpl_thread_pool;
-extern int rpl_parallel_change_thread_count(rpl_parallel_thread_pool *pool,
- uint32 new_count,
- bool skip_check= false);
+extern int rpl_parallel_activate_pool(rpl_parallel_thread_pool *pool);
+extern int rpl_parallel_inactivate_pool(rpl_parallel_thread_pool *pool);
extern bool process_gtid_for_restart_pos(Relay_log_info *rli, rpl_gtid *gtid);
#endif /* RPL_PARALLEL_H */