forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9be4ce4
committed
Make deadlock-parallel isolation test more robust.
This test failed fairly reproducibly on some CLOBBER_CACHE_ALWAYSbuildfarm animals. The cause seems to be that if a parallel workeris slow enough to reach its lock wait, it may not be released bythe first deadlock check run, and then later deadlock checks mightdecide to unblock the d2 session instead of the d1 session, leavingus in an undetected deadlock state (since the isolationtester clientis waiting for d1 to complete first).Fix by introducing an additional lock wait at the end of the d2a1step, ensuring that the deadlock checker will recognize that d1has to be unblocked before d2a1 completes.Also reduce max_parallel_workers_per_gather to 3 in this test. With thedefault max_worker_processes value, we were only getting one parallelworker for the d2a1 step, which is not the case I hoped to test. Weshould get 3 for d1a2 and 2 for d2a1, as the code stands; and maybe 3for d2a1 if somebody figures out why the last parallel worker slot isn'tfree already.Discussion:https://postgr.es/m/22195.1566077308@sss.pgh.pa.us1 parentd78d452 commit9be4ce4
File tree
2 files changed
+43
-12
lines changed- src/test/isolation
- expected
- specs
2 files changed
+43
-12
lines changedLines changed: 13 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 |
| - | |
5 |
| - | |
| 4 | + | |
| 5 | + | |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 |
| - | |
27 |
| - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 |
| |
29 | 33 |
| |
30 | 34 |
| |
| |||
38 | 42 |
| |
39 | 43 |
| |
40 | 44 |
| |
| 45 | + | |
| 46 | + | |
| 47 | + | |
41 | 48 |
| |
42 | 49 |
| |
43 | 50 |
| |
|
Lines changed: 30 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
18 | 37 |
| |
19 | 38 |
| |
20 | 39 |
| |
| |||
39 | 58 |
| |
40 | 59 |
| |
41 | 60 |
| |
42 |
| - | |
43 |
| - | |
| 61 | + | |
| 62 | + | |
44 | 63 |
| |
45 | 64 |
| |
46 | 65 |
| |
47 | 66 |
| |
48 | 67 |
| |
49 | 68 |
| |
50 |
| - | |
| 69 | + | |
51 | 70 |
| |
52 | 71 |
| |
53 | 72 |
| |
| |||
58 | 77 |
| |
59 | 78 |
| |
60 | 79 |
| |
61 |
| - | |
| 80 | + | |
| 81 | + | |
62 | 82 |
| |
63 | 83 |
| |
64 | 84 |
| |
65 | 85 |
| |
66 | 86 |
| |
67 |
| - | |
68 |
| - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
69 | 93 |
| |
70 | 94 |
| |
71 | 95 |
| |
|
0 commit comments
Comments
(0)