Set different deadlock_timeout on each session in new isolation tests
This provides deterministic deadlock-detection ordering for new isolation tests, fixing the sporadic failures in them. Author: Noah Misch
This commit is contained in:
parent
bf3c585681
commit
d71197cd35
@ -32,8 +32,8 @@ step s1i: INSERT INTO child VALUES (1, 1);
|
||||
step s2i: INSERT INTO child VALUES (2, 1);
|
||||
step s2u: UPDATE parent SET aux = 'baz'; <waiting ...>
|
||||
step s1u: UPDATE parent SET aux = 'bar';
|
||||
step s2u: <... completed>
|
||||
ERROR: deadlock detected
|
||||
step s2u: <... completed>
|
||||
step s2c: COMMIT;
|
||||
step s1c: COMMIT;
|
||||
|
||||
@ -52,8 +52,8 @@ step s2i: INSERT INTO child VALUES (2, 1);
|
||||
step s1i: INSERT INTO child VALUES (1, 1);
|
||||
step s2u: UPDATE parent SET aux = 'baz'; <waiting ...>
|
||||
step s1u: UPDATE parent SET aux = 'bar';
|
||||
step s2u: <... completed>
|
||||
ERROR: deadlock detected
|
||||
step s2u: <... completed>
|
||||
step s2c: COMMIT;
|
||||
step s1c: COMMIT;
|
||||
|
||||
|
@ -42,8 +42,8 @@ step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||
step s2u2: <... completed>
|
||||
ERROR: deadlock detected
|
||||
step s2u2: <... completed>
|
||||
step s1c: COMMIT;
|
||||
step s2c: COMMIT;
|
||||
|
||||
@ -52,8 +52,8 @@ step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||
step s2u2: <... completed>
|
||||
ERROR: deadlock detected
|
||||
step s2u2: <... completed>
|
||||
step s2c: COMMIT;
|
||||
step s1c: COMMIT;
|
||||
|
||||
@ -82,8 +82,8 @@ step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||
step s2u2: <... completed>
|
||||
ERROR: deadlock detected
|
||||
step s2u2: <... completed>
|
||||
step s1c: COMMIT;
|
||||
step s2c: COMMIT;
|
||||
|
||||
@ -92,8 +92,8 @@ step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||
step s2u2: <... completed>
|
||||
ERROR: deadlock detected
|
||||
step s2u2: <... completed>
|
||||
step s2c: COMMIT;
|
||||
step s1c: COMMIT;
|
||||
|
||||
|
@ -19,13 +19,13 @@ teardown
|
||||
}
|
||||
|
||||
session "s1"
|
||||
setup { BEGIN; }
|
||||
setup { BEGIN; SET deadlock_timeout = '20ms'; }
|
||||
step "s1i" { INSERT INTO child VALUES (1, 1); }
|
||||
step "s1u" { UPDATE parent SET aux = 'bar'; }
|
||||
step "s1c" { COMMIT; }
|
||||
|
||||
session "s2"
|
||||
setup { BEGIN; }
|
||||
setup { BEGIN; SET deadlock_timeout = '10s'; }
|
||||
step "s2i" { INSERT INTO child VALUES (2, 1); }
|
||||
step "s2u" { UPDATE parent SET aux = 'baz'; }
|
||||
step "s2c" { COMMIT; }
|
||||
|
@ -24,13 +24,13 @@ teardown
|
||||
}
|
||||
|
||||
session "s1"
|
||||
setup { BEGIN; }
|
||||
setup { BEGIN; SET deadlock_timeout = '20ms'; }
|
||||
step "s1u1" { UPDATE A SET Col1 = 1 WHERE AID = 1; }
|
||||
step "s1u2" { UPDATE B SET Col2 = 1 WHERE BID = 2; }
|
||||
step "s1c" { COMMIT; }
|
||||
|
||||
session "s2"
|
||||
setup { BEGIN; }
|
||||
setup { BEGIN; SET deadlock_timeout = '10s'; }
|
||||
step "s2u1" { UPDATE B SET Col2 = 1 WHERE BID = 2; }
|
||||
step "s2u2" { UPDATE B SET Col2 = 1 WHERE BID = 2; }
|
||||
step "s2c" { COMMIT; }
|
||||
|
Loading…
Reference in New Issue
Block a user