Commit 3071763
committed
Fix isolationtester race condition for notices sent before blocking.
If a test sends a notice just before blocking, it's possible on
slow machines for isolationtester to detect the blocked state before
it's consumed the notice. (For this to happen, the notice would have
to arrive after isolationtester has waited for data for 10ms, so on
fast/lightly-loaded machines it's hard to reproduce the failure.)
But, if we have seen the backend as blocked, it's certainly already
sent any notices it's going to send. Therefore, one more round of
PQconsumeInput and PQisBusy should be enough to collect and process
any such notices.
This appears to explain the instability noted in commit ebd4992, so undo
the hack therein to not print notices from insert-conflict-specconflict.
Patch by me, diagnosis by Andres Freund.
Discussion: https://postgr.es/m/14616.1564251339@sss.pgh.pa.us1 parent ebd4992 commit 3071763
File tree
3 files changed
+60
-6
lines changed- src/test/isolation
- expected
- specs
3 files changed
+60
-6
lines changedLines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| 37 | + | |
| 38 | + | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| 43 | + | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
| |||
50 | 58 | | |
51 | 59 | | |
52 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
53 | 65 | | |
54 | 66 | | |
55 | 67 | | |
| |||
69 | 81 | | |
70 | 82 | | |
71 | 83 | | |
| 84 | + | |
| 85 | + | |
72 | 86 | | |
| 87 | + | |
| 88 | + | |
73 | 89 | | |
74 | 90 | | |
75 | 91 | | |
| |||
86 | 102 | | |
87 | 103 | | |
88 | 104 | | |
| 105 | + | |
| 106 | + | |
89 | 107 | | |
90 | 108 | | |
91 | 109 | | |
92 | 110 | | |
| 111 | + | |
| 112 | + | |
93 | 113 | | |
94 | 114 | | |
95 | 115 | | |
| |||
106 | 126 | | |
107 | 127 | | |
108 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
109 | 133 | | |
110 | 134 | | |
111 | 135 | | |
| |||
127 | 151 | | |
128 | 152 | | |
129 | 153 | | |
| 154 | + | |
| 155 | + | |
130 | 156 | | |
| 157 | + | |
| 158 | + | |
131 | 159 | | |
132 | 160 | | |
133 | 161 | | |
| |||
144 | 172 | | |
145 | 173 | | |
146 | 174 | | |
| 175 | + | |
| 176 | + | |
147 | 177 | | |
148 | 178 | | |
149 | 179 | | |
150 | 180 | | |
| 181 | + | |
| 182 | + | |
151 | 183 | | |
152 | 184 | | |
153 | 185 | | |
| |||
163 | 195 | | |
164 | 196 | | |
165 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
166 | 202 | | |
167 | 203 | | |
168 | 204 | | |
169 | 205 | | |
| 206 | + | |
| 207 | + | |
170 | 208 | | |
171 | 209 | | |
172 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
752 | 752 | | |
753 | 753 | | |
754 | 754 | | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
755 | 777 | | |
756 | 778 | | |
757 | 779 | | |
| |||
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
| |||
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 64 | | |
71 | 65 | | |
72 | 66 | | |
| |||
0 commit comments