Commit 92c6864
authored
Batch ingestion not correctly handling OperationCancelledException which can cause the ingestion to never used incoming context tasks and hang. (#4780)
- Rectored to use BackgroundService
- Fix `catch (OperationCancelledException)` blocks to add `when` guards - only ignore cancellations set by caller
- Overriding Start and Stop to support graceful shutdown and improve intent and readability
- Ensure TrySetException is always set on exception
- Logging improvements around cancellation to inform that tasks got cancelled. Important when shutting down to diagnose where teardown "hangs".1 parent 1d34d8c commit 92c6864
File tree
30 files changed
+211
-146
lines changed- src
- Particular.LicensingComponent
- AuditThroughput
- BrokerThroughput
- ServiceControl.AcceptanceTesting
- ServiceControl.Audit
- Auditing
- Infrastructure/Hosting/Commands
- ServiceControl.Infrastructure.Metrics
- ServiceControl.Infrastructure
- ServiceControl.Monitoring/Infrastructure
- ServiceControl.Persistence.RavenDB
- ServiceControl.RavenDB
- ServiceControl.Transports.ASBS
- ServiceControl.Transports.ASQ
- ServiceControl.Transports.Learning
- ServiceControl.Transports.PostgreSql
- ServiceControl.Transports.RabbitMQ
- ServiceControl.Transports.SQS
- ServiceControl.Transports.SqlServer
- ServiceControl
- CompositeViews/Messages
- CustomChecks/InternalCustomChecks
- Hosting/Commands
- Infrastructure/Metrics
- Monitoring
- Operations
30 files changed
+211
-146
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
71 | 63 | | |
72 | 64 | | |
73 | 65 | | |
| |||
132 | 124 | | |
133 | 125 | | |
134 | 126 | | |
135 | | - | |
| 127 | + | |
136 | 128 | | |
137 | 129 | | |
138 | 130 | | |
| |||
170 | 162 | | |
171 | 163 | | |
172 | 164 | | |
173 | | - | |
| 165 | + | |
174 | 166 | | |
175 | 167 | | |
176 | 168 | | |
| |||
200 | 192 | | |
201 | 193 | | |
202 | 194 | | |
203 | | - | |
| 195 | + | |
204 | 196 | | |
205 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
206 | 200 | | |
207 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
208 | 204 | | |
209 | | - | |
210 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
211 | 208 | | |
212 | | - | |
213 | | - | |
| 209 | + | |
| 210 | + | |
214 | 211 | | |
215 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
216 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
217 | 240 | | |
218 | | - | |
| 241 | + | |
219 | 242 | | |
220 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
221 | 247 | | |
222 | | - | |
| 248 | + | |
223 | 249 | | |
224 | | - | |
225 | | - | |
226 | 250 | | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
233 | 270 | | |
234 | | - | |
| 271 | + | |
235 | 272 | | |
236 | | - | |
| 273 | + | |
237 | 274 | | |
238 | | - | |
239 | | - | |
240 | | - | |
| 275 | + | |
241 | 276 | | |
242 | | - | |
| 277 | + | |
243 | 278 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | 279 | | |
252 | 280 | | |
253 | | - | |
254 | 281 | | |
255 | 282 | | |
256 | 283 | | |
| |||
273 | 300 | | |
274 | 301 | | |
275 | 302 | | |
276 | | - | |
277 | 303 | | |
278 | 304 | | |
279 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
| 43 | + | |
41 | 44 | | |
42 | | - | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | | - | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
0 commit comments