mariadb/mysql-test/suite
Kristian Nielsen e365877bae MDEV-33798: ROW base optimistic deadlock with concurrent writes on same table
One case is conflicting transactions T1 and T2 with different domain id, in
optimistic parallel replication in non-GTID mode. Then T2 will
wait_for_prior_commit on T1; and if T1 got a row lock wait on T2 it would
hang, as different domains caused the deadlock kill to be skipped in
thd_rpl_deadlock_check().

More generally, if we have transactions T1 and T2 in one domain/master
connection, and independent transactions U in another, then we can
still deadlock like this:

  T1 row low wait on U
  U row lock wait on T2
  T2 wait_for_prior_commit on T1

This commit enforces the deadlock kill in these cases. If the waited-for
transaction is speculatively applied, then it will be deadlock killed in
case of a conflict, even if the two transactions are in different domains
or master connections.

Reviewed-by: Andrei Elkin <andrei.elkin@mariadb.com>
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2024-05-02 21:07:45 +02:00
..
archive
atomic
binlog Merge 10.5 into 10.6 2024-04-18 07:14:56 +03:00
binlog_encryption sporadic failures of binlog_encryption.rpl_parallel_slave_bgc_kill 2024-04-21 01:17:31 +02:00
client
compat Merge branch '10.5' into 10.6 2024-04-11 13:58:22 +02:00
csv
encryption Merge 10.5 into 10.6 2024-04-18 07:14:56 +03:00
engines Fixed some mtr results found in Jenins after MDEV-333582 push 2024-03-06 15:16:03 +02:00
federated Merge 10.5 into 10.6 2024-02-07 13:51:03 +02:00
funcs_1 Merge branch '10.5' into 10.6 2024-01-31 18:04:03 +01:00
funcs_2
galera Merge branch '10.5' into 10.6 2024-04-29 10:08:58 +02:00
galera_3nodes Merge branch '10.5' into 10.6 2024-04-29 10:08:58 +02:00
galera_3nodes_sr Merge 10.5 into 10.6 2024-04-18 07:14:56 +03:00
galera_sr Merge branch '10.5' into 10.6 2024-04-29 10:08:58 +02:00
gcol MDEV-26642/MDEV-26643/MDEV-32898 Implement innodb_snapshot_isolation 2024-03-20 09:48:03 +02:00
handler
heap
innodb MDEV-31161 Assertion failures upon adding a too long key to table with COMPRESSED row 2024-04-30 20:40:29 +05:30
innodb_fts Merge 10.5 into 10.6 2024-04-18 07:14:56 +03:00
innodb_gis Merge 10.5 into 10.6 2024-04-18 07:14:56 +03:00
innodb_i_s
innodb_zip Merge 10.5 into 10.6 2024-04-18 07:14:56 +03:00
jp
json Merge branch '10.5' into 10.6 2024-03-13 21:02:34 +01:00
large_tests fix failing large_tests.maria_recover_encrypted 2024-04-22 17:22:11 +02:00
maria Merge 10.5 into 10.6 2024-04-18 07:14:56 +03:00
mariabackup Merge branch '10.5' into 10.6 2024-04-29 10:08:58 +02:00
mtr/t
mtr2
multi_source Merge 10.5 into 10.6 2024-04-17 14:14:58 +03:00
optimizer_unfixed_bugs
parts Merge 10.5 into 10.6 2024-04-18 07:14:56 +03:00
perfschema Merge branch '10.5' into 10.6 2024-04-29 10:08:58 +02:00
perfschema_stress
period Merge 10.5 into 10.6 2024-02-07 13:51:03 +02:00
plugins reorder the log columns for MDEV-27087 2024-01-23 21:34:43 +05:30
roles Merge 10.5 into 10.6 2023-11-15 14:10:21 +02:00
rpl MDEV-33798: ROW base optimistic deadlock with concurrent writes on same table 2024-05-02 21:07:45 +02:00
s3 update s3.partition result after 57ffcd686f 2024-03-14 11:43:13 +01:00
sql_sequence Merge branch '10.5' into 10.6 2024-01-11 12:59:22 +11:00
storage_engine
stress
sys_vars Merge branch '10.5' into 10.6 2024-04-11 13:58:22 +02:00
sysschema Merge 10.5 into 10.6 2024-03-12 09:19:57 +02:00
unit
vcol Merge branch '10.5' into 10.6 2023-12-17 11:20:43 +01:00
versioning Merge 10.5 into 10.6 2024-02-13 20:42:59 +02:00
wsrep Merge 10.5 into 10.6 2023-12-21 12:58:11 +02:00