pub enum BootstrapState {
Start,
PreCheckpoint {
tvfs: Vec<Arc<VirtualTable>>,
checkpoint_st: CompleteCheckpointState,
},
PreReparse {
tvfs: Vec<Arc<VirtualTable>>,
reparse_st: ReparseSchemaState,
},
BeginReadTxTs {
read_st: ReadPersistentTxTsMaxState,
},
MetadataIo(MetadataIoInFlight),
FinishInit {
init_st: InitMetadataTableState,
},
FinishCheckpoint {
checkpoint_st: CompleteCheckpointState,
},
Recover {
recover_st: RecoverLogicalLogState,
},
LoadSequences {
load_st: LoadSequenceDescriptorsState,
},
SyncAutoincrement {
sync_st: SyncAutoincrementState,
},
AwaitingGlobalHeader,
}Expand description
Sub state machine for MvStore::bootstrap_nonblock. Carried by the
open state machine (OpenDbAsyncPhase::BootstrapMvStore) across the
metadata-bootstrap IO chain so opening an MVCC database does not block on
the log-header truncate / write / fsync sequence, the interrupted-checkpoint
reconciliation, the schema reparse, or the metadata-table reads/writes.
Variants§
Start
PreCheckpoint
Pre-metadata: reconcile an interrupted checkpoint (non-blocking).
PreReparse
Pre-metadata: reparse the schema (non-blocking).
BeginReadTxTs
Reading the persistent tx-ts-max from the MVCC metadata table to decide whether the metadata-bootstrap IO chain is needed.
Fields
read_st: ReadPersistentTxTsMaxStateMetadataIo(MetadataIoInFlight)
FinishInit
Finish: create/seed the MVCC metadata table (non-blocking).
Fields
init_st: InitMetadataTableStateFinishCheckpoint
Finish: reconcile the interrupted checkpoint again after metadata writes.
Fields
checkpoint_st: CompleteCheckpointStateRecover
Replay the logical log into the MVCC store (non-blocking), then promote the bootstrap connection to a regular MVCC connection.
Fields
recover_st: RecoverLogicalLogStateLoadSequences
Recover sequence descriptors from each backing table (non-blocking). The pre-replay reparse missed backing tables created by committed-but- not-checkpointed CREATE SEQUENCE statements; this pass registers pure descriptors via the MVCC-aware SQL path. The runtime watermark is never read — every nextval queries disk on demand.
Fields
load_st: LoadSequenceDescriptorsStateSyncAutoincrement
Compatibility sync for AUTOINCREMENT tables created in WAL mode (where the watermark lives in sqlite_sequence) and then reopened in MVCC mode (where the disk-only allocation path reads backing tables). Non-blocking.
Fields
sync_st: SyncAutoincrementStateAwaitingGlobalHeader
Trait Implementations§
Source§impl Default for BootstrapState
impl Default for BootstrapState
Source§fn default() -> BootstrapState
fn default() -> BootstrapState
Auto Trait Implementations§
impl !RefUnwindSafe for BootstrapState
impl !UnwindSafe for BootstrapState
impl Freeze for BootstrapState
impl Send for BootstrapState
impl Sync for BootstrapState
impl Unpin for BootstrapState
impl UnsafeUnpin for BootstrapState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more