forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf4083c4
committed
injection_points: Fix race condition with local injection point tests
The module relies on a shmem exit callback to clean up any injectionpoints linked to a specific process. One of the tests checks for thecase of an injection point name reused in a second connection where thefirst connection should clean it up, but it did not count for the factthat the shmem exit callback of the first connection may not have runwhen the second connection begins its work.The regress library includes a wait_pid() that can be used for thispurpose, instead of a custom wait logic, so let's rely on it to wait forthe first connection to exit before working with the second connection.The module gains a REGRESS_OPTS to be able to look at the regresslibrary's dlpath.This issue could be reproduced with a hardcoded sleep() in the shmemexit callback, and the CI has been able to trigger it sporadically.Oversight inf587338.Reported-by: Bharath RupireddyReviewed-by: Andrey BorodinDiscussion:https://postgr.es/m/ZhOd3NXAutteokGL@paquier.xyz1 parentf463de5 commitf4083c4
File tree
4 files changed
+35
-0
lines changed- src/test/modules/injection_points
- expected
- sql
4 files changed
+35
-0
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| 10 | + | |
10 | 11 |
| |
11 | 12 |
| |
12 | 13 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
2 | 9 |
| |
3 | 10 |
| |
4 | 11 |
| |
| |||
156 | 163 |
| |
157 | 164 |
| |
158 | 165 |
| |
| 166 | + | |
159 | 167 |
| |
160 | 168 |
| |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
161 | 177 |
| |
162 | 178 |
| |
163 | 179 |
| |
| |||
193 | 209 |
| |
194 | 210 |
| |
195 | 211 |
| |
| 212 | + |
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
36 | 37 |
| |
37 | 38 |
| |
38 | 39 |
| |
|
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
3 | 12 |
| |
4 | 13 |
| |
5 | 14 |
| |
| |||
40 | 49 |
| |
41 | 50 |
| |
42 | 51 |
| |
| 52 | + | |
| 53 | + | |
| 54 | + | |
43 | 55 |
| |
44 | 56 |
| |
| 57 | + | |
| 58 | + | |
| 59 | + | |
45 | 60 |
| |
46 | 61 |
| |
47 | 62 |
| |
| |||
52 | 67 |
| |
53 | 68 |
| |
54 | 69 |
| |
| 70 | + |
0 commit comments
Comments
(0)