Skip to content
Permalink
Browse files
MDEV-16664: Add deprecation warning for innodb_lock_schedule_algorith…
…m=VATS

The setting innodb_lock_schedule_algorithm=VATS that was introduced
in MDEV-11039 (commit 021212b)
causes conflicting exclusive locks to be incorrectly granted to
two transactions. Specifically, in lock_rec_insert_by_trx_age()
the predicate !lock_rec_has_to_wait_in_queue(in_lock) would hold even
though an active transaction is already holding an exclusive lock.
This was observed between two DELETE of the same clustered index record.
The HASH_DELETE invocation in lock_rec_enqueue_waiting() may be related.

Due to lack of progress in diagnosing the problem, we will deprecate the
option and issue a warning that using it may corrupt data. The unsafe
option was enabled between
commit 0c15d1a (MariaDB 10.2.3)
and the parent of
commit 1cc1d04 (MariaDB 10.2.17, 10.3.9).
  • Loading branch information
dr-m committed Oct 5, 2020
1 parent 199bc67 commit 295e2d5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.

This file was deleted.

This file was deleted.

@@ -3750,14 +3750,23 @@ innobase_init(
goto error;
}

if (innodb_lock_schedule_algorithm == INNODB_LOCK_SCHEDULE_ALGORITHM_VATS) {
ib::warn() << "The parameter innodb_lock_schedule_algorithm"
" is deprecated, and the setting"
" innodb_lock_schedule_algorithm=vats"
" may cause corruption. The parameter may be removed"
" in future releases.";

#ifdef WITH_WSREP
/* Currently, Galera does not support VATS lock schedule algorithm. */
if (innodb_lock_schedule_algorithm == INNODB_LOCK_SCHEDULE_ALGORITHM_VATS
&& global_system_variables.wsrep_on) {
ib::info() << "For Galera, using innodb_lock_schedule_algorithm=fcfs";
innodb_lock_schedule_algorithm = INNODB_LOCK_SCHEDULE_ALGORITHM_FCFS;
/* Currently, Galera does not support VATS lock schedule algorithm. */
if (global_system_variables.wsrep_on) {
ib::info() << "For Galera, using innodb_lock_schedule_algorithm=fcfs";
innodb_lock_schedule_algorithm = INNODB_LOCK_SCHEDULE_ALGORITHM_FCFS;
}
#endif /* WITH_WSREP */
}

#ifdef WITH_WSREP
/* Print deprecation info if xtrabackup is used for SST method */
if (global_system_variables.wsrep_on
&& wsrep_sst_method

0 comments on commit 295e2d5

Please sign in to comment.