{"record":{"id":"60e9cf0b994b5396","repo":"nautechsystems/nautilus_trader","slug":"catalog-marker-join-plan-failed-for-data-cls-e","errorCode":null,"errorMessage":"catalog marker join plan failed for {data_cls}: {error}","messagePattern":"catalog marker join plan failed for (.+?): (.+?)","errorType":"exception","errorClass":"EventStoreError::Backend","httpStatus":null,"severity":"error","filePath":"crates/event_store/src/markers/join.rs","lineNumber":168,"sourceCode":"fn replayable_data_class(data_cls: DataClass) -> Option<&'static str> {\n    match data_cls {\n        DataClass::Quote => Some(\"quotes\"),\n        DataClass::Trade => Some(\"trades\"),\n        DataClass::Bar => Some(\"bars\"),\n        DataClass::BookDeltas | DataClass::BookDepth10 => None,\n    }\n}\n\nfn plan_slice<C>(\n    catalog: &mut C,\n    query: &CatalogSliceQuery,\n) -> Result<CatalogSliceCoverage, EventStoreError>\nwhere\n    C: ReplayCatalog + ?Sized,\n{\n    catalog\n        .plan_slice(query)\n        .map_err(|e| catalog_error(&query.data_cls, \"plan\", e))\n}\n\nfn load_slice<C>(\n    catalog: &mut C,\n    plan: &CatalogSlicePlan,\n) -> Result<Vec<CatalogReplayRecord>, EventStoreError>\nwhere\n    C: ReplayCatalog + ?Sized,\n{\n    catalog\n        .load_slice(plan)\n        .map_err(|e| catalog_error(&plan.query.data_cls, \"load\", e))\n}\n\nfn catalog_error(data_cls: &str, action: &str, error: impl Display) -> EventStoreError {\n    EventStoreError::Backend(format!(\n        \"catalog marker join {action} failed for {data_cls}: {error}\"\n    ))","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/event_store/src/markers/join.rs#L150-L186","documentation":"While computing replayable records for a marker join, the event store asks the catalog to produce a slice plan (`plan_slice`). If the catalog backend fails planning, the error is converted via `catalog_error` into `EventStoreError::Backend` with the message 'catalog marker join plan failed for {data_cls}: {error}'. It wraps the underlying backend failure with the data class and action for context.","triggerScenarios":"Calling `load_replayable_records` on a catalog whose backend cannot plan the queried slice — malformed query range, unsupported `data_cls`, backend storage error (corrupt index, unavailable store), or a `ReplayCatalog` implementation returning a planning error.","commonSituations":"Replaying event-store data against a catalog whose backend is down or misconfigured; querying a data class the catalog does not support; range/query parameters invalid for the backend (e.g. inverted start/end).","solutions":["Inspect the wrapped `{error}` in the message to identify the underlying backend cause and fix that first","Validate the `query` (data class, time range) against the catalog's supported classes and ranges before replay","Verify the catalog backend is reachable and its indexes/storage are healthy","Implement `ReplayCatalog::plan_slice` correctly if this is a custom catalog"],"exampleFix":"// before: planning failure surfaces mid-replay\nlet records = store.load_replayable_records(&query)?;\n// after: validate query / handle backend error up front\nmatch catalog.plan_slice(&query) {\n    Ok(_) => { let records = store.load_replayable_records(&query)?; }\n    Err(e) => log::error!(\"replay planning failed for {}: {e}\", query.data_cls),\n}","handlingStrategy":"try-catch","validationCode":"// Pre-check the catalog can plan this query before replay\nif let Err(e) = catalog.plan_slice(&query) {\n    log::error!(\"cannot plan replay for {}: {e}\", query.data_cls);\n    return;\n}","typeGuard":null,"tryCatchPattern":"match store.load_replayable_records(&query) {\n    Err(EventStoreError::Backend(msg)) if msg.contains(\"plan failed\") => {\n        eprintln!(\"catalog planning failed, aborting replay: {msg}\");\n    }\n    Err(e) => return Err(e.into()),\n    Ok(records) => process(records),\n}","preventionTips":["Validate query ranges and data_cls against the catalog's supported set before replay","Monitor backend health (connectivity, index integrity) before starting long replays","For custom ReplayCatalogs, unit-test plan_slice against representative queries"],"tags":["rust","event-store","catalog","replay","backend"],"backgroundTag":"database-query-failed","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"}