Skip to content

Commit

Permalink
MDEV-16664: Remove innodb_lock_schedule_algorithm
Browse files Browse the repository at this point in the history
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 remove the
option. The unsafe option was enabled by default between
commit 0c15d1a (MariaDB 10.2.3)
and the parent of
commit 1cc1d04 (MariaDB 10.2.17, 10.3.9),
and it was deprecated in
commit 295e2d5 (MariaDB 10.2.34).
  • Loading branch information
dr-m committed Oct 5, 2020
1 parent 3b72b35 commit b4fb15c
Show file tree
Hide file tree
Showing 19 changed files with 32 additions and 702 deletions.
9 changes: 0 additions & 9 deletions mysql-test/suite/galera/galera_2nodes.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
# enforce read-committed characteristics across the cluster
wsrep-sync-wait=15
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[mysqld.1]
loose-innodb
Expand All @@ -28,9 +25,6 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
wsrep_sync_wait = 15
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[mysqld.2]
loose-innodb
Expand All @@ -54,9 +48,6 @@ wsrep_sst_receive_address='127.0.0.2:@mysqld.2.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
wsrep_sync_wait = 15
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[ENV]
NODE_MYPORT_1= @mysqld.1.port
Expand Down
12 changes: 0 additions & 12 deletions mysql-test/suite/galera/galera_2nodes_as_master.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ log-bin=mysqld-bin
binlog-format=row
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[mysqld.1]
#galera_port=@OPT.port
Expand All @@ -33,9 +30,6 @@ wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=15
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[mysqld.2]
#galera_port=@OPT.port
Expand All @@ -55,15 +49,9 @@ wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=15
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[mysqld.3]
server-id=3
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[ENV]
NODE_MYPORT_1= @mysqld.1.port
Expand Down
3 changes: 0 additions & 3 deletions mysql-test/suite/galera/galera_2nodes_as_slave.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
wsrep-causal-reads=ON
wsrep-sync-wait=15
server-id=1
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[mysqld.2]
#galera_port=@OPT.port
Expand Down
15 changes: 0 additions & 15 deletions mysql-test/suite/galera/galera_3nodes_as_slave.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
[mysqld]
log-bin
binlog-format=row
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[mysqld.1]
#galera_port=@OPT.port
Expand All @@ -34,9 +31,6 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
wsrep-causal-reads=ON
wsrep-sync-wait=15
server-id=1
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[mysqld.2]
#galera_port=@OPT.port
Expand All @@ -60,9 +54,6 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
wsrep-causal-reads=ON
wsrep-sync-wait=15
server-id=2
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[mysqld.3]
#galera_port=@OPT.port
Expand All @@ -86,15 +77,9 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
wsrep-causal-reads=ON
wsrep-sync-wait=15
server-id=3
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[mysqld.4]
server-id=4
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[ENV]
NODE_MYPORT_1= @mysqld.1.port
Expand Down
15 changes: 0 additions & 15 deletions mysql-test/suite/galera/galera_4nodes.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ wsrep_node_address=127.0.0.1
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=15
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[mysqld.1]
#galera_port=@OPT.port
Expand All @@ -23,9 +20,6 @@ wsrep-cluster-address=gcomm://
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[mysqld.2]
#galera_port=@OPT.port
Expand All @@ -36,9 +30,6 @@ wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS


[mysqld.3]
Expand All @@ -50,9 +41,6 @@ wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS


[mysqld.4]
Expand All @@ -64,9 +52,6 @@ wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS

[ENV]
NODE_MYPORT_1= @mysqld.1.port
Expand Down
110 changes: 0 additions & 110 deletions mysql-test/suite/innodb/r/innodb-lock-schedule-algorithm.result

This file was deleted.

2 changes: 0 additions & 2 deletions mysql-test/suite/innodb/t/innodb-lock-schedule-algorithm.opt

This file was deleted.

106 changes: 0 additions & 106 deletions mysql-test/suite/innodb/t/innodb-lock-schedule-algorithm.test

This file was deleted.

1 change: 0 additions & 1 deletion mysql-test/suite/innodb/t/innodb_trx_weight.opt

This file was deleted.

Loading

0 comments on commit b4fb15c

Please sign in to comment.