pub struct KeyValueDiskANNStore { /* private fields */ }Expand description
A dedicated physical staging session. Its completion methods resolve existing evaluated attempts; they never replay a mutation or complete the caller’s SQL transaction.
Implementations§
Source§impl KeyValueDiskANNStore
impl KeyValueDiskANNStore
Sourcepub fn reclaim_abandoned_step(
&self,
generation: DiskANNGeneration,
max_records: usize,
control: &StorageReadControl,
) -> StorageBackendResult<bool>
pub fn reclaim_abandoned_step( &self, generation: DiskANNGeneration, max_records: usize, control: &StorageReadControl, ) -> StorageBackendResult<bool>
Reclaim an unpublished generation only after exclusively acquiring its abandoned physical owner. A live build, retained sealed source or uncertain original attempt returns false without deleting anything. Each successful step deletes at most 64 payload records; partial cleanup persists Discarding and can resume through either reclamation method. Current published heads are always rejected.
Sourcepub fn reclaim_retired_step(
&self,
generation: DiskANNGeneration,
max_records: usize,
control: &StorageReadControl,
) -> StorageBackendResult<bool>
pub fn reclaim_retired_step( &self, generation: DiskANNGeneration, max_records: usize, control: &StorageReadControl, ) -> StorageBackendResult<bool>
Delete at most 64 payload records from a durably retired generation. The final step removes its state. Current heads and unpublished builds cannot be reclaimed here. Retained sources keep the historical pages through ordinary MVCC leases; version reclamation remains separate. Resolve an uncertain original attempt before calling again.
Source§impl KeyValueDiskANNStore
impl KeyValueDiskANNStore
Sourcepub fn allocate_bound_stage(
&self,
scope: &DiskANNIndexScope,
control: &StorageReadControl,
) -> StorageBackendResult<KeyValueDiskANNStage>
pub fn allocate_bound_stage( &self, scope: &DiskANNIndexScope, control: &StorageReadControl, ) -> StorageBackendResult<KeyValueDiskANNStage>
Atomically establish catalog mappings and an owned Writing generation. Publication still requires the retained source’s current-definition guard and complete build coverage; start remains idempotent.
pub fn connect( source: &Arc<dyn KeyValueStore>, control: &StorageReadControl, ) -> StorageBackendResult<Self>
Sourcepub fn initialize(
&self,
control: &StorageReadControl,
) -> StorageBackendResult<[u8; 16]>
pub fn initialize( &self, control: &StorageReadControl, ) -> StorageBackendResult<[u8; 16]>
Establish a persistent data identity once. It remains separate from transaction-history identity across backup restoration.
pub fn data_identity( &self, control: &StorageReadControl, ) -> StorageBackendResult<[u8; 16]>
Sourcepub fn allocate_stage(
&self,
table: u64,
index: u64,
control: &StorageReadControl,
) -> StorageBackendResult<KeyValueDiskANNStage>
pub fn allocate_stage( &self, table: u64, index: u64, control: &StorageReadControl, ) -> StorageBackendResult<KeyValueDiskANNStage>
Reserve a never-reused generation number. Starting the returned handle is a separate fallible operation, so the caller retains its identity if creation loses its commit reply.
Sourcepub fn resume_stage(
&self,
generation: DiskANNGeneration,
control: &StorageReadControl,
) -> StorageBackendResult<KeyValueDiskANNStage>
pub fn resume_stage( &self, generation: DiskANNGeneration, control: &StorageReadControl, ) -> StorageBackendResult<KeyValueDiskANNStage>
Reopen an existing staging owner; an absent or discarded generation cannot be recreated by this path.
pub fn open_source( &self, generation: DiskANNGeneration, control: &StorageReadControl, ) -> StorageBackendResult<Arc<KeyValueDiskANNSource>>
Sourcepub fn commit_pending(&self) -> StorageBackendResult<()>
pub fn commit_pending(&self) -> StorageBackendResult<()>
Finish the exact retained attempt, including acknowledgement after a durable commit with a lost reply.
Sourcepub fn rollback_pending(&self) -> StorageBackendResult<()>
pub fn rollback_pending(&self) -> StorageBackendResult<()>
Resolve or abort the exact retained attempt. A confirmed durable commit remains a committed outcome from the underlying session.