Skip to content

Commit 612f490

Browse files
committed
rocksdb.unique_check: attempt to remove race condtitions from the test
1 parent 143fede commit 612f490

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

storage/rocksdb/mysql-test/rocksdb/r/unique_check.result

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,14 @@ id id2 value
6666
2 1 2
6767
truncate table t2;
6868
connection con1;
69-
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go1';
69+
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go';
7070
insert into t1 values (1,1);
71+
connection default;
72+
set debug_sync='now WAIT_FOR parked1';
7173
connection con2;
72-
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go2';
74+
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go';
7375
insert into t2 values (1,1,1);
7476
connection default;
75-
set debug_sync='now WAIT_FOR parked1';
7677
set debug_sync='now WAIT_FOR parked2';
7778
connection con3;
7879
set session rocksdb_lock_wait_timeout=1;
@@ -81,8 +82,7 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
8182
insert into t2 values (2,1,2);
8283
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
8384
connection default;
84-
set debug_sync='now SIGNAL go1';
85-
set debug_sync='now SIGNAL go2';
85+
set debug_sync='now SIGNAL go';
8686
connection con1;
8787
connection con2;
8888
connection default;

storage/rocksdb/mysql-test/rocksdb/t/unique_check.test

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,17 @@ truncate table t2;
102102

103103
# 4) simulating T1 GetForUpdate() -> T2 GetForUpdate(). T2 should fail with lock wait timeout.
104104
connection con1;
105-
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go1';
105+
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go';
106106
send insert into t1 values (1,1);
107107

108+
connection default;
109+
set debug_sync='now WAIT_FOR parked1';
110+
108111
connection con2;
109-
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go2';
112+
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go';
110113
send insert into t2 values (1,1,1);
111114

112115
connection default;
113-
set debug_sync='now WAIT_FOR parked1';
114116
set debug_sync='now WAIT_FOR parked2';
115117

116118
connection con3;
@@ -121,8 +123,7 @@ insert into t1 values (1,2);
121123
insert into t2 values (2,1,2);
122124

123125
connection default;
124-
set debug_sync='now SIGNAL go1';
125-
set debug_sync='now SIGNAL go2';
126+
set debug_sync='now SIGNAL go';
126127

127128
connection con1;
128129
reap;

0 commit comments

Comments
 (0)