diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2017-12-09 11:20:46 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2017-12-09 11:20:46 +0200 |
commit | e66bb5726716b7852c880e02b0acf0f5b9a1e8ee (patch) | |
tree | a2b97972b492a3e3aab580679951e289196cdf58 /sql | |
parent | 1374f958c120ee0fdf3f4b017f1289aba87dae07 (diff) | |
download | mariadb-git-e66bb5726716b7852c880e02b0acf0f5b9a1e8ee.tar.gz |
MDEV-12837: WSREP: BF lock wait long
This is 10.1 version where no merge error exists.
wsrep_on_check
New check function. Galera can't be enabled
if innodb-lock-schedule-algorithm=VATS.
innobase_kill_query
In Galera async kill we could own lock mutex.
innobase_init
If Variance-Aware-Transaction-Sheduling Algorithm (VATS) is
used on Galera we refuse to start InnoDB.
Changed innodb-lock-schedule-algorithm as read-only parameter
as it was designed to be.
lock_rec_other_has_expl_req,
lock_rec_other_has_conflicting,
lock_rec_lock_slow
lock_table_other_has_incompatible
lock_rec_insert_check_and_lock
Change pointer to conflicting lock to normal pointer as this
pointer contents could be changed later.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sys_vars.cc | 3 | ||||
-rw-r--r-- | sql/wsrep_var.cc | 16 | ||||
-rw-r--r-- | sql/wsrep_var.h | 3 |
3 files changed, 20 insertions, 2 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 8eb3d35a96e..303633939c3 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -4895,7 +4895,8 @@ static Sys_var_mybool Sys_wsrep_on ( "wsrep_on", "To enable wsrep replication ", SESSION_VAR(wsrep_on), CMD_LINE(OPT_ARG), DEFAULT(FALSE), - NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + NO_MUTEX_GUARD, NOT_IN_BINLOG, + ON_CHECK(wsrep_on_check), ON_UPDATE(wsrep_on_update)); static Sys_var_charptr Sys_wsrep_start_position ( diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index b21041eb0f8..ad1f4ec0eac 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -52,12 +52,28 @@ int wsrep_init_vars() return 0; } +extern ulong innodb_lock_schedule_algorithm; + bool wsrep_on_update (sys_var *self, THD* thd, enum_var_type var_type) { if (var_type == OPT_GLOBAL) { // FIXME: this variable probably should be changed only per session thd->variables.wsrep_on = global_system_variables.wsrep_on; } + + return false; +} + +bool wsrep_on_check(sys_var *self, THD* thd, set_var* var) +{ + bool new_wsrep_on= (bool)var->save_result.ulonglong_value; + + if (new_wsrep_on && innodb_lock_schedule_algorithm != 0) { + my_message(ER_WRONG_ARGUMENTS, " WSREP (galera) can't be enabled " + "if innodb_lock_schedule_algorithm=VATS. Please configure" + " innodb_lock_schedule_algorithm=FCFS and restart.", MYF(0)); + return true; + } return false; } diff --git a/sql/wsrep_var.h b/sql/wsrep_var.h index 7530fd98870..55eb2fbc501 100644 --- a/sql/wsrep_var.h +++ b/sql/wsrep_var.h @@ -41,7 +41,8 @@ int wsrep_init_vars(); #define DEFAULT_ARGS (THD* thd, enum_var_type var_type) #define INIT_ARGS (const char* opt) -extern bool wsrep_causal_reads_update UPDATE_ARGS; +extern bool wsrep_causal_reads_update UPDATE_ARGS; +extern bool wsrep_on_check CHECK_ARGS; extern bool wsrep_on_update UPDATE_ARGS; extern bool wsrep_sync_wait_update UPDATE_ARGS; extern bool wsrep_start_position_check CHECK_ARGS; |