Commit 6858087
committed
colcontainer: harden ctx capture in diskQueueWriter
In ffb4666 we added more memory
accounting to the disk queue. This required capturing the context inside
the `diskQueueWriter` in order to preserve the `io.Writer` signature. We
just saw a test failure where this capture was problematic - it's
possible that when we close the disk queue as a whole (which happens
_after_ closing all operators) that the captured context contains the
tracing span that has been finished (since the relevant operator has
already been closed). To go around this issue we now update the captured
context before finishing each file.
An alternative solution could've been to use `context.Background` since
we only need the context object for memory accounting purposes (in
a single `Resize` call) so losing some contextual information there
doesn't seem like a big deal.
Release note: None1 parent 0c9c77f commit 6858087
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
600 | 606 | | |
601 | 607 | | |
602 | 608 | | |
| |||
0 commit comments