Skip to content

Commit ddfcad5

Browse files
committed
logictest: fix fk_cascade_race_150282
In #150291 we added subtest `fk_cascade_race_150282` which exercises FK checks performed by concurrent Serializable and Read Committed transactions. Unfortunately thanks to this test we've discovered that the locking added in #150291 is insufficient for preventing all FK violations. We need to turn on the disabled parent-FK-check locking for the Serializable transaction. This commmit fixes subtest `fk_cascade_race_150282` by turning on these settings for the Serializable transaction: - `enable_implicit_fk_locking_for_serializable` - `enable_shared_locking_for_serializable` - `enable_durable_locking_for_serializable` Informs: #151663 Release note: None
1 parent 8757f96 commit ddfcad5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/ccl/logictestccl/testdata/logic_test/fk_read_committed

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ WITH sleep AS (SELECT pg_sleep(1)) DELETE FROM parent_150282@parent_150282_i_idx
140140
user testuser
141141

142142
statement ok
143+
SET enable_implicit_fk_locking_for_serializable = on;
144+
SET enable_shared_locking_for_serializable = on;
145+
SET enable_durable_locking_for_serializable = on;
143146
INSERT INTO child_150282 VALUES (4, 1);
144147

145148
user root
@@ -176,6 +179,9 @@ WITH sleep AS (SELECT pg_sleep(1)) UPDATE parent_150282 SET p = 4 WHERE i = 2;
176179
user testuser
177180

178181
statement ok
182+
SET enable_implicit_fk_locking_for_serializable = on;
183+
SET enable_shared_locking_for_serializable = on;
184+
SET enable_durable_locking_for_serializable = on;
179185
INSERT INTO child_150282 VALUES (4, 1);
180186

181187
user root

0 commit comments

Comments
 (0)