From 8981ee238aa780d2bf44cb6876ea2f20030393ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 9 Oct 2024 11:26:12 +0300 Subject: [PATCH] MDEV-33106 innodb.innodb-lock-inherit-read_commited times out Sometimes, in MariaDB Server 10.5 but apparently not in later branches, the test would hang because con1 and con2 would be blocked in debug_sync (for example, lock_wait_suspend_thread_enter and row_ins_sec_index_entry_dup_locks_created) and therefore blocking the purge of transactions from completing. To prevent an occasional DEBUG_SYNC induced hang in the test, we will wait for everything to be purged, except the last 2 transactions. This change should be null-merged to 10.6, because the test is not failing in 10.6 or later major versions. --- .../suite/innodb/r/innodb-lock-inherit-read_commited.result | 4 ++-- .../suite/innodb/t/innodb-lock-inherit-read_commited.test | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb-lock-inherit-read_commited.result b/mysql-test/suite/innodb/r/innodb-lock-inherit-read_commited.result index 1fe569d28ef..d93aae49ea4 100644 --- a/mysql-test/suite/innodb/r/innodb-lock-inherit-read_commited.result +++ b/mysql-test/suite/innodb/r/innodb-lock-inherit-read_commited.result @@ -40,7 +40,7 @@ connection purge_control; COMMIT; disconnect purge_control; connection default; -InnoDB 0 transactions not purged +SET GLOBAL innodb_max_purge_lag_wait=2; SET debug_sync = 'now SIGNAL con2_go WAIT_FOR con2_insert_done'; SET debug_sync = 'now SIGNAL con1_go WAIT_FOR con1_insert_done'; SET debug_sync = 'now SIGNAL con1_finish'; @@ -99,7 +99,7 @@ connection purge_control; COMMIT; disconnect purge_control; connection default; -InnoDB 0 transactions not purged +SET GLOBAL innodb_max_purge_lag_wait=2; SET debug_sync = 'now SIGNAL con2_go WAIT_FOR con2_insert_done'; SET debug_sync = 'now SIGNAL con1_go WAIT_FOR con1_insert_done'; SET debug_sync = 'now SIGNAL con1_finish'; diff --git a/mysql-test/suite/innodb/t/innodb-lock-inherit-read_commited.test b/mysql-test/suite/innodb/t/innodb-lock-inherit-read_commited.test index d9c933fa9b5..b89aead5afa 100644 --- a/mysql-test/suite/innodb/t/innodb-lock-inherit-read_commited.test +++ b/mysql-test/suite/innodb/t/innodb-lock-inherit-read_commited.test @@ -79,7 +79,7 @@ disconnect purge_control; connection default; # Wait for purge to delete the delete-marked record ---source ../../innodb/include/wait_all_purged.inc +SET GLOBAL innodb_max_purge_lag_wait=2; SET debug_sync = 'now SIGNAL con2_go WAIT_FOR con2_insert_done'; SET debug_sync = 'now SIGNAL con1_go WAIT_FOR con1_insert_done';