Commit a843435
fix(topology): Fix for issue causing stalling on shutdown for sinks configured w/ disk buffers (#24949)
* fix(buffers): prevent reload stall when disk buffer config changes
- Changing a disk buffer's configuration (e.g. `max_size`) during a
live config reload would stall indefinitely or fail with a `buffer.lock` error.
This was caused by two issues:
1. The sink's detach trigger was only cancelled for buffer-reuse
cases, so sinks with changed disk buffer configs never had their input
stream terminated — disk buffer readers do not return `None` when the
writer disconnects, causing the old sink task to hang forever.
2. The source output pump only processed fanout control messages
(Remove/Pause) during active sends, so idle sources would never drop their
`BufferSender` clone, keeping the `Arc<Ledger>` file lock alive even after the
sink task completed.
- Cancel the detach trigger for changed disk buffer sinks so the old
sink task can complete.
- Make the source output pump `select!` on both events and fanout
control messages, so Remove/Pause is processed promptly even when the source
is idle.
- Add a retry loop (30s timeout) when acquiring the disk buffer lock
to handle the small race window between the sink task completing and the
fanout releasing the writer.
- Add `BufferConfig::has_disk_stage()` helper for identifying disk
buffer configurations.
* Add unit tests for reload when disk buffer config modified
* Add changelog fragment
* Integration test exercising full disk buffer path w/ s3 sink
- This test sets up a pipeline that sends using the s3 sinks with disk
buffers enabled.
- Data is sent through the disk buffer before and after configuration
reload.
* Clean-up changelog fragment
* Fix spelling issues
* Fix merge error and cleanup use of config()
- Make consistent use of the config() method in all tests within this
file
* Simplify set of control_channel_open status
* Remove unnecessary mutable modifiers
* Prefer tempDir to just writing to /tmp
---------
Co-authored-by: Pavlos Rontidis <pavlos.rontidis@gmail.com>1 parent 156b832 commit a843435
7 files changed
Lines changed: 396 additions & 111 deletions
File tree
- changelog.d
- lib
- vector-buffers/src
- vector-core/src
- src
- sinks/aws_s3
- topology
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
374 | 381 | | |
375 | 382 | | |
376 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
111 | 125 | | |
112 | 126 | | |
113 | 127 | | |
| |||
0 commit comments