{"record":{"id":"514c68cca296d12d","repo":"nautechsystems/nautilus_trader","slug":"catalog-catalog-name-disappeared-between-interva","errorCode":null,"errorMessage":"Catalog {catalog_name} disappeared between intervals query and read","messagePattern":"Catalog (.+?) disappeared between intervals query and read","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/data/src/engine/streaming.rs","lineNumber":391,"sourceCode":"    fn abort_request_pipeline(&mut self, parent_id: UUID4) {\n        self.request_pipeline_n_components.remove(&parent_id);\n        self.request_pipeline_parent_request.remove(&parent_id);\n        self.request_pipeline_responses.remove(&parent_id);\n        self.request_pipeline_parent_request_id\n            .retain(|_, p_id| *p_id != parent_id);\n    }\n\n    fn query_catalog_leg(\n        &mut self,\n        leg: &RequestCommand,\n        catalog_name: Ustr,\n        start_ns: UnixNanos,\n        end_ns: UnixNanos,\n        used_client_id: Option<ClientId>,\n        ts_init: UnixNanos,\n    ) -> anyhow::Result<DataResponse> {\n        let catalog = self.catalogs.get_mut(&catalog_name).ok_or_else(|| {\n            anyhow::anyhow!(\"Catalog {catalog_name} disappeared between intervals query and read\")\n        })?;\n\n        match leg {\n            RequestCommand::Quotes(cmd) => {\n                let data: Vec<QuoteTick> = catalog.quote_ticks(\n                    Some(vec![cmd.instrument_id.to_string()]),\n                    Some(start_ns),\n                    Some(end_ns),\n                )?;\n                Ok(build_quotes_catalog_response(\n                    cmd,\n                    data,\n                    start_ns,\n                    end_ns,\n                    used_client_id,\n                    ts_init,\n                ))\n            }","sourceCodeStart":373,"sourceCodeEnd":409,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/data/src/engine/streaming.rs#L373-L409","documentation":"While dispatching a date-range request leg, query_catalog_leg re-fetches the Parquet catalog from self.catalogs by name after the initial intervals query, and the entry is gone. The engine treats catalog removal between the two lookups as an unrecoverable inconsistency and raises this error rather than returning partial data.","triggerScenarios":"Calling query_catalog_leg (via dispatch_date_range_request) with a catalog_name that was present during the intervals query but has been removed from self.catalogs (or mutated out) before the get_mut at read time.","commonSituations":"A concurrent write/registration operation removed or replaced the catalog mid-request; a typo in the catalog name means only the earlier lookup path resolved it (e.g. case/alias handling); the catalog was closed and deregistered while a long-running date-range dispatch was in flight.","solutions":["Confirm the catalog name passed to the date-range request exactly matches a registered catalog.","Check for concurrent code paths that deregister or close catalogs while requests are in flight; serialize or lock catalog lifecycle changes.","Re-register the catalog (or re-run registration) before re-issuing the request.","Capture/hold the catalog reference across the whole request instead of re-fetching by name at read time."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// confirm the catalog is registered before dispatching a date-range request\nif !engine.catalogs.contains_key(&catalog_name) {\n    return Err(anyhow::anyhow!(\"catalog {catalog_name} not registered\"));\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"disappeared between intervals query and read\") => {\n        // re-register catalog and retry the request once\n    }\n    other => other?,\n}","preventionTips":["Never deregister or close catalogs while date-range requests are in flight.","Centralize catalog name construction to avoid typos and case mismatches.","Hold the catalog registration for the duration of long-running queries."],"tags":["catalog","parquet","streaming","rust"],"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-14T05:17:10.506Z"}