pub fn open_run(
config: &EventStoreConfig,
instance_id: &str,
run_id: RunId,
parent_run_id: Option<RunId>,
start_ts_init: UnixNanos,
components: &RegisteredComponents,
halt_signal: HaltSignal,
clock: &'static AtomicTime,
) -> Result<EventStoreSession, BootError>Expand description
Opens a fresh run, spawns the writer, and submits a blocking RunStarted entry.
The kernel calls this from start() after components have registered with the
trader so the captured RunStarted payload reflects the actual boot configuration.
The function blocks until the writer’s high-watermark advances past zero (i.e. the
RunStarted entry has durably committed) or until EventStoreConfig::run_started_timeout
elapses.
feature_flags is appended after the configured feature_flags so the retention
mode survives in the manifest as retention=<mode>.
§Errors
Returns BootError::EventStore when the backend rejects open, BootError::RunStartedSubmit
when the writer rejects the submit, BootError::RunStartedTimeout when the
commit does not happen inside the configured ceiling, and BootError::HaltedDuringBoot
when the writer fail-stops while waiting for the commit.