From 8672339328c30c894b4062f94c4fb0510fb20f9a Mon Sep 17 00:00:00 2001 From: Kristian Nielsen Date: Fri, 6 Feb 2015 10:02:02 +0100 Subject: MDEV-6676: Optimistic parallel replication Adjust the configuration options, as discussed on the maria-developers@ mailing list. The option to hint a transaction to not be replicated in parallel is now called @@skip_parallel_replication, consistent with @@skip_replication. And the --slave-parallel-mode is now simplified to have just one of the following values: none minimal conservative optimistic aggressive This reflects successively harder efforts to find opportunities to run things in parallel on the slave. It allows to extend the server with more automatic heuristics in the future without having to introduce a new configuration option for each and every one. --- sql/rpl_mi.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sql/rpl_mi.h') diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h index 87ac0a5a46b..b74b9cb42b3 100644 --- a/sql/rpl_mi.h +++ b/sql/rpl_mi.h @@ -184,7 +184,8 @@ class Master_info : public Slave_reporting_capability static const char *using_gtid_astext(enum enum_using_gtid arg); bool using_parallel() { - return opt_slave_parallel_threads > 0 && parallel_mode != 0; + return opt_slave_parallel_threads > 0 && + parallel_mode > SLAVE_PARALLEL_NONE; } /* the variables below are needed because we can change masters on the fly */ @@ -300,12 +301,8 @@ class Master_info : public Slave_reporting_capability /* domain-id based filter */ Domain_id_filter domain_id_filter; - /* - The parallel replication modes, if any. A combination (binary OR) of any - of SLAVE_PARALLEL_DOMAIN, SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT, - SLAVE_PARALLEL_TRX, and SLAVE_PARALLEL_WAITING. - */ - ulonglong parallel_mode; + /* The parallel replication mode. */ + enum_slave_parallel_mode parallel_mode; }; int init_master_info(Master_info* mi, const char* master_info_fname, -- cgit v1.2.1