{"record":{"id":"fa1696b693c30a89","repo":"vectordotdev/vector","slug":"pausing-unknown-sink-from-fanout-id","errorCode":null,"errorMessage":"Pausing unknown sink from fanout: {id}","messagePattern":"Pausing unknown sink from fanout: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"lib/vector-core/src/fanout.rs","lineNumber":112,"sourceCode":"                    sender.replace(Sender::new(sink)).is_none(),\n                    \"Replacing existing sink is not valid: {id}\"\n                );\n            }\n            None => panic!(\"Replacing unknown sink from fanout: {id}\"),\n        }\n    }\n\n    fn pause(&mut self, id: &ComponentKey) {\n        match self.senders.get_mut(id) {\n            Some(sender) => {\n                // A sink must be known and present to be replaced, otherwise an invalid sequence of\n                // control operations has been applied.\n                assert!(\n                    sender.take().is_some(),\n                    \"Pausing nonexistent sink is not valid: {id}\"\n                );\n            }\n            None => panic!(\"Pausing unknown sink from fanout: {id}\"),\n        }\n    }\n\n    /// Waits for the next control message and applies it.\n    ///\n    /// Returns `true` if a message was processed, `false` if the control\n    /// channel was closed.\n    pub async fn recv_control_message(&mut self) -> bool {\n        match self.control_channel.recv().await {\n            Some(msg) => {\n                self.apply_control_message(msg);\n                true\n            }\n            None => false,\n        }\n    }\n\n    /// Apply a control message directly against this instance.","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/vectordotdev/vector/blob/3708c39b12a93212ed8b8d7510b4cc7769cb5864/lib/vector-core/src/fanout.rs#L94-L130","documentation":"Handling ControlMessage::Pause, Fanout::pause() looks up the sink by ComponentKey and panics when the key is absent. Pausing is only valid for a sink the fanout knows: the topology pauses a sink (taking its sender) right before replacing it during a rebuild. An unknown key means the control protocol was violated - pausing something that was never added or was already removed.","triggerScenarios":"A ControlMessage::Pause(id) processed after ControlMessage::Remove(id), or for an id that never had a successful Add; the None arm of senders.get_mut(id) is hit and the panic fires. Occurs mid-reload when sink sets are computed inconsistently.","commonSituations":"Config reloads that remove and re-add sinks in one operation on older Vector builds; unit tests of topology rebuilding that exercise pause/replace with stale ids; custom orchestrators wrapping Vector's topology API and emitting duplicate Pause messages.","solutions":["Upgrade Vector - pause/replace sequencing bugs in the fanout have been fixed upstream; verify against the release changelog","If it reproduces, file an issue with the reload sequence (before/after configs) and debug logs of ControlMessage traffic","Avoid reloading configs that simultaneously remove and re-add the same sink id; restart instead","For embedders: track added ids and emit at most one Pause per id, strictly between its Add and its Remove/Replace"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before pausing, confirm the sink is still registered in your orchestration view\n// and that you have not already sent Remove for it:\nif registered.contains(&id) && !removed.contains(&id) {\n    control_tx.send(ControlMessage::Pause(id));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never emit Pause for a sink id that was Removed or never Added","Emit at most one Pause per id between Add and Replace/Remove","Avoid single reloads that both remove and re-add the same sink id; split or restart","Test reload sequences against a staging topology under traffic"],"tags":["rust","vector","fanout","topology","reload","panic"],"backgroundTag":"invalid-state-transition","analyzedSha":"3708c39b12a93212ed8b8d7510b4cc7769cb5864","analyzedAt":"2026-08-20T07:02:18.786Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T20:17:18.057Z"}