An ill-timed crash may lead to an AddSST command at raft log index N being visible in the LSM but the state machine not having advanced to N yet. We need to reconcile this at Store.Start time (before any raft processing happens), by applying such commands. We need to make sure that it is always possible to apply such commands standalone, i.e. we need to have the fact that this command is committed durable before we ever attempt to apply it in the first place.
An ill-timed crash may lead to an AddSST command at raft log index N being visible in the LSM but the state machine not having advanced to N yet. We need to reconcile this at
Store.Start
time (before any raft processing happens), by applying such commands. We need to make sure that it is always possible to apply such commands standalone, i.e. we need to have the fact that this command is committed durable before we ever attempt to apply it in the first place.https://github.com/tbg/cockroach/blob/e292a73f2af0e55aa760cce168622732c0716ff6/pkg/kv/kvserver/replicas_storage.go#L489-L504
Epic: CRDB-220
Jira issue: CRDB-22237