Commit 942c0cf
Merge #153277
153277: roachtest: indefinite block on task events r=srosenberg a=herkolategan
Previously, we could end up with dangling goroutines for tasks if some tasks were trying to send events, but the consumer has already stopped consuming events. This would cause an indefinite block in the task goroutine when trying to send the event.
This change adds a `select` when trying to send the events, but if the context has been cancelled, it will break out. There's a small chance that the event could end up being sent even if the context has been canceled, but on the consumer side we also check for a canceled context.
Epic: None
Release note: None
Co-authored-by: Herko Lategan <herko@cockroachlabs.com>1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
233 | 244 | | |
234 | 245 | | |
235 | 246 | | |
| |||
0 commit comments