fix(topology): handle rebuilding connected components (#9536)
Fixes #9173 This was a bit of a doozy. It turns out that if you do a config reload that rebuilds two components that are directly connected, Vector will panic on a broken invariant in `Fanout`. The problem is basically that: 1. When replacing the upstream component, the new input for the rebuilt downstream component has not yet been registered and therefore doesn't get readded to the rebuilt `Fanout`. 2. When replacing the downstream component, the input referencing the upstream component isn't changing, so we assume we're already registered there and need to do an update instead of an insert. 3. When the `Fanout` gets an update (i.e. `ControlMessage::Replace`) for a sink that it doesn't have registered, we panic. This is a very good argument for finding a way to property test our reloads, as there are likely other edge cases we just haven't run into yet. It'd also be very helpful to continue pushing towards a more graph-based config representation internally that could make this logic far simpler. Signed-off-by: Luke Steensen <luke.steensen@gmail.com>
L
Luke Steensen committed
18c3b27cea7f348d1df9be2fb20da11b6decbaff
Parent: cd5238a
Committed by GitHub <noreply@github.com>
on 10/12/2021, 10:26:39 PM