{"record":{"id":"2a4cbfdb25437de1","repo":"nautechsystems/nautilus_trader","slug":"no-active-time-range-pipeline-for-parent-id","errorCode":null,"errorMessage":"No active time-range pipeline for {parent_id}","messagePattern":"No active time-range pipeline for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/data/src/engine/time_range.rs","lineNumber":162,"sourceCode":"\n    fn time_range_pipeline_response_client_id(&mut self, req: &RequestCommand) -> ClientId {\n        let request_client_id = req.client_id().copied();\n        let venue = req.venue().copied();\n        self.get_client(request_client_id.as_ref(), venue.as_ref())\n            .map(|client| client.client_id())\n            .or(request_client_id)\n            .unwrap_or_else(|| ClientId::new(\"CATALOG\"))\n    }\n\n    fn dispatch_next_time_range_pipeline_request(\n        &mut self,\n        parent_id: UUID4,\n        data_received: Option<bool>,\n    ) -> anyhow::Result<()> {\n        let ts_init = self.clock.borrow().timestamp_ns();\n        let child = {\n            let Some(state) = self.time_range_pipeline_requests.get_mut(&parent_id) else {\n                anyhow::bail!(\"No active time-range pipeline for {parent_id}\");\n            };\n\n            state.generator.next_window(data_received).map(|window| {\n                time_range_child_request(&state.parent, window.start_ns, window.end_ns, ts_init)\n            })\n        };\n        let Some(child) = child else {\n            self.emit_empty_time_range_pipeline_response(parent_id);\n            return Ok(());\n        };\n\n        let child_id = *child.request_id();\n        self.time_range_pipeline_parent_request_id\n            .insert(child_id, parent_id);\n\n        if let Err(e) = self.execute_request(child) {\n            self.time_range_pipeline_parent_request_id.remove(&child_id);\n            return Err(e);","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/data/src/engine/time_range.rs#L144-L180","documentation":"dispatch_next_time_range_pipeline_request looks up the parent's TimeRangePipelineState by parent_id; if no active pipeline is registered under that ID, the engine cannot produce the next child window and bails. It means the pipeline either never started, already completed and was removed, or the caller passed a stale/wrong UUID4.","triggerScenarios":"Calling dispatch_next_time_range_pipeline_request (directly or via handle_time_range_pipeline_child_response) with a parent_id that is not in self.time_range_pipeline_requests — e.g. after the pipeline finished and was cleaned up, or with a child request ID mistaken for the parent ID.","commonSituations":"Responding to a child request using the child's ID instead of the parent's; a duplicate/late child response arriving after the pipeline was removed; replaying recorded messages out of order across engine restarts.","solutions":["Always pass the parent request's UUID4, not the child's, when advancing the pipeline","Guard against processing duplicate or late child responses after pipeline completion","Log/track pipeline lifecycle so dispatch is only invoked while the pipeline is active"],"exampleFix":"// before\nengine.dispatch_next_time_range_pipeline_request(child_id, Some(true))?;\n// after\nengine.dispatch_next_time_range_pipeline_request(parent_request_id, Some(true))?; // parent UUID4","handlingStrategy":"try-catch","validationCode":"if !active_pipelines.contains_key(&parent_id) { return Err(anyhow!(\"pipeline {parent_id} not active\")); }","typeGuard":null,"tryCatchPattern":"match engine.dispatch_next_time_range_pipeline_request(parent_id, data_received) {\n    Err(e) if e.to_string().contains(\"No active time-range pipeline\") => {/* pipeline finished; ignore late callback */},\n    other => other?,\n}","preventionTips":["Store the parent UUID4 alongside each child response so callbacks advance the right pipeline","Treat pipeline completion as terminal: drop/ignore subsequent child responses","Log pipeline insert/remove events to correlate lifecycle with callbacks"],"tags":["rust","time-range","pipeline","state-management"],"backgroundTag":"resource-not-found","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}