Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.d/24532_vector_stopped_log_ordering.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fixed log message ordering on shutdown where `Vector has stopped.` was logged before
components had finished draining, causing confusing output interleaved with
`Waiting on running components` messages.
20 changes: 11 additions & 9 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,16 +493,18 @@ impl FinishedApplication {
}

async fn stop(topology_controller: TopologyController, mut signal_rx: SignalRx) -> ExitStatus {
emit!(VectorStopped);
tokio::select! {
_ = topology_controller.stop() => ExitStatus::from_raw({
#[cfg(windows)]
{
exitcode::OK as u32
}
#[cfg(unix)]
exitcode::OK
}), // Graceful shutdown finished
_ = topology_controller.stop() => {
emit!(VectorStopped);
ExitStatus::from_raw({
#[cfg(windows)]
{
exitcode::OK as u32
}
#[cfg(unix)]
exitcode::OK
})
}, // Graceful shutdown finished
_ = signal_rx.recv() => Self::quit(),
}
}
Expand Down
Loading