{"record":{"id":"b821e27e39ee0b96","repo":"nautechsystems/nautilus_trader","slug":"event-store-replay-did-not-start","errorCode":null,"errorMessage":"event-store replay did not start","messagePattern":"event-store replay did not start","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/backtest/src/engine.rs","lineNumber":809,"sourceCode":"            self.force_stop = false;\n            self.kernel.reset_shutdown_flag();\n\n            // Initialize sync command senders (once per thread)\n            Self::init_command_senders();\n\n            // Set logging to static clock mode for deterministic timestamps\n            logging_clock_set_static_mode();\n            logging_clock_set_static_time(start_ns.as_u64());\n\n            // Start kernel, then stop before trader startup for event-store replay\n            self.kernel.start();\n            if self.kernel.is_event_store_replay() {\n                self.log_pre_run();\n                return Ok(());\n            }\n\n            if self.kernel.is_event_store_replay_configured() {\n                anyhow::bail!(\"event-store replay did not start\");\n            }\n            self.kernel.start_trader()?;\n\n            // Drain on_start data subscriptions so aggregators subscribe before the first data\n            // point, else internal aggregation drops the first tick. Trading/exec stay queued\n            while !data_cmd_queue_is_empty() {\n                drain_data_cmd_queue();\n            }\n\n            self.log_pre_run();\n        }\n\n        self.log_run();\n\n        // Skip data before start_ns\n        while let Some(d) = self.data_iterator.peek() {\n            if d.ts_init() >= start_ns {\n                break;","sourceCodeStart":791,"sourceCodeEnd":827,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/backtest/src/engine.rs#L791-L827","documentation":"The engine detected that an event-store replay was configured but the replay never actually started before the run proceeded. run_impl bails to avoid silently trading without replaying the requested event-store data.","triggerScenarios":"Event-store replay configured (e.g. via kernel/catalog event replay settings) but the replay did not begin: misconfigured replay source, empty/unreachable event store, or replay not initiated before reaching this check.","commonSituations":"Pointing replay at a non-existent or empty event-store stream; wrong session/storage configuration; streaming flags suppressing replay start.","solutions":["Verify the event-store replay configuration (catalog path, stream/session ids) points to existing replayable data","Check kernel event-replay setup so replay is actually initiated before trading starts","Confirm data exists in the event store for the requested time range"],"exampleFix":"// before\nlet engine = get_backtest_engine_with_event_replay(\"/wrong/path\");\nengine.run(None, None, None, false)?;\n// after\nlet engine = get_backtest_engine_with_event_replay(\"/correct/catalog\"); // contains replay data\nengine.run(None, None, None, false)?;","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match engine.run(...) {\n    Err(e) if e.to_string() == \"event-store replay did not start\" => {\n        eprintln!(\"check event-store replay config and data availability: {e}\");\n    }\n    other => other?,\n}","preventionTips":["Verify the event store contains data for the replay range before running","Test replay configuration with a small known dataset first","Confirm replay initiation happens before trading starts in your setup path"],"tags":["backtest","event-store","replay"],"backgroundTag":"invalid-state-transition","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"}