From ba0d8aeffac4be9efe856e105a20af6436838140 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Wed, 7 Aug 2024 11:26:15 +0300 Subject: [PATCH] Fix rocksdb.unique_check: do not have two threads waiting on the same name --- storage/rocksdb/mysql-test/rocksdb/r/unique_check.result | 7 ++++--- storage/rocksdb/mysql-test/rocksdb/t/unique_check.test | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/storage/rocksdb/mysql-test/rocksdb/r/unique_check.result b/storage/rocksdb/mysql-test/rocksdb/r/unique_check.result index db9b119043a..8ea557ebdbf 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/unique_check.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/unique_check.result @@ -66,12 +66,12 @@ id id2 value 2 1 2 truncate table t2; connection con1; -set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go'; +set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go1'; insert into t1 values (1,1); connection default; set debug_sync='now WAIT_FOR parked1'; connection con2; -set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go'; +set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go2'; insert into t2 values (1,1,1); connection default; set debug_sync='now WAIT_FOR parked2'; @@ -82,7 +82,8 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction insert into t2 values (2,1,2); ERROR HY000: Lock wait timeout exceeded; try restarting transaction connection default; -set debug_sync='now SIGNAL go'; +set debug_sync='now SIGNAL go1'; +set debug_sync='now SIGNAL go2'; connection con1; connection con2; connection default; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/unique_check.test b/storage/rocksdb/mysql-test/rocksdb/t/unique_check.test index e2520388ea7..e9718ff74ae 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/unique_check.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/unique_check.test @@ -102,14 +102,14 @@ truncate table t2; # 4) simulating T1 GetForUpdate() -> T2 GetForUpdate(). T2 should fail with lock wait timeout. connection con1; -set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go'; +set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go1'; send insert into t1 values (1,1); connection default; set debug_sync='now WAIT_FOR parked1'; connection con2; -set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go'; +set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go2'; send insert into t2 values (1,1,1); connection default; @@ -123,7 +123,8 @@ insert into t1 values (1,2); insert into t2 values (2,1,2); connection default; -set debug_sync='now SIGNAL go'; +set debug_sync='now SIGNAL go1'; +set debug_sync='now SIGNAL go2'; connection con1; reap;