pub struct ObjectStoreCheckpointStore { /* private fields */ }Expand description
Checkpoint store backed by any [ObjectStore] implementation.
Implementations§
Source§impl ObjectStoreCheckpointStore
impl ObjectStoreCheckpointStore
Sourcepub fn new(store: Arc<dyn ObjectStore>, prefix: &str) -> Self
pub fn new(store: Arc<dyn ObjectStore>, prefix: &str) -> Self
Create a store beneath a deployment-relative prefix.
Node namespaces are derived as {prefix}/nodes/{participant_id}/; callers must not include
a node id in prefix.
Sourcepub fn with_exclusive_writer(self) -> Self
pub fn with_exclusive_writer(self) -> Self
Permit exact overwrite transitions while an external lock excludes every other writer.
The caller must retain exclusive ownership of this checkpoint namespace for the complete store lifetime. Shared object-store deployments must use conditional updates instead.
Sourcepub fn with_participant_id(self, participant_id: u64) -> Self
pub fn with_participant_id(self, participant_id: u64) -> Self
Bind the store to one nonzero node id.
Sourcepub fn with_key_group_count(self, key_group_count: KeyGroupCount) -> Self
pub fn with_key_group_count(self, key_group_count: KeyGroupCount) -> Self
Set the exact vnode topology.
Sourcepub fn with_max_node_data_bytes(
self,
limit: u64,
) -> Result<Self, CheckpointStoreError>
pub fn with_max_node_data_bytes( self, limit: u64, ) -> Result<Self, CheckpointStoreError>
Trait Implementations§
Source§impl CheckpointStore for ObjectStoreCheckpointStore
impl CheckpointStore for ObjectStoreCheckpointStore
Source§fn max_node_data_bytes(&self) -> u64
fn max_node_data_bytes(&self) -> u64
Maximum bytes admitted for one node data object.
Source§fn key_group_count(&self) -> KeyGroupCount
fn key_group_count(&self) -> KeyGroupCount
Stable vnode count expected in manifests.
Source§fn participant_id(&self) -> u64
fn participant_id(&self) -> u64
Node whose manifests this store writes.
Source§fn save_checkpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
manifest: &'life1 CheckpointManifest,
node_data: &'life2 [Bytes],
) -> Pin<Box<dyn Future<Output = Result<Bytes, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_checkpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
manifest: &'life1 CheckpointManifest,
node_data: &'life2 [Bytes],
) -> Pin<Box<dyn Future<Output = Result<Bytes, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Validate and conditional-create the immutable node data object, then its manifest. Active
inventory and exact Abort seals reconcile creates left ambiguous by caller cancellation.
Source§fn save_sink_artifact_intents<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
expected_artifact_identity_sha256: &'life1 str,
intents: Vec<CheckpointSinkArtifactIntent>,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_sink_artifact_intents<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
expected_artifact_identity_sha256: &'life1 str,
intents: Vec<CheckpointSinkArtifactIntent>,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persist every committable sink’s bounded cleanup intent before
begin_epoch.Source§fn seal_aborted_manifest<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
expected_artifact_identity_sha256: &'life1 str,
sink_artifact_intent_protocol: bool,
) -> Pin<Box<dyn Future<Output = Result<CheckpointManifestAbortSeal, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn seal_aborted_manifest<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
expected_artifact_identity_sha256: &'life1 str,
sink_artifact_intent_protocol: bool,
) -> Pin<Box<dyn Future<Output = Result<CheckpointManifestAbortSeal, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Replace this exact aborted manifest path with a monotone seal. The protocol flag must come
from the exact active artifact inventory. If a valid manifest was already durable,
preserve it inside the seal and return it with its canonical bytes.
Source§fn complete_aborted_sink_cleanup<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
expected_artifact_identity_sha256: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<CheckpointManifestAbortSeal, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn complete_aborted_sink_cleanup<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
expected_artifact_identity_sha256: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<CheckpointManifestAbortSeal, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Mark exact prepared-sink cleanup complete on an already sealed manifest.
Source§fn seal_aborted_node_data<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
expected_artifact_identity_sha256: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn seal_aborted_node_data<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
expected_artifact_identity_sha256: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Replace this exact aborted node-data path with a monotone seal after sink cleanup is durable.
Source§fn load_manifest_for_participant<'life0, 'async_trait>(
&'life0 self,
participant_id: u64,
checkpoint_id: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<CheckpointManifest>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_manifest_for_participant<'life0, 'async_trait>(
&'life0 self,
participant_id: u64,
checkpoint_id: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<CheckpointManifest>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load an exact manifest from a known participant namespace.
Source§fn load_manifest_verified<'life0, 'life1, 'async_trait>(
&'life0 self,
participant_id: u64,
checkpoint_id: u64,
expected_len: u64,
expected_sha256: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<CheckpointManifest>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_manifest_verified<'life0, 'life1, 'async_trait>(
&'life0 self,
participant_id: u64,
checkpoint_id: u64,
expected_len: u64,
expected_sha256: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<CheckpointManifest>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load a manifest only when its exact persisted length and digest match a committed index.
Source§fn load_node_data_ranges<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
expected_object_length: u64,
ranges: &'life1 [ByteRange],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Bytes>>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_node_data_ranges<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
expected_object_length: u64,
ranges: &'life1 [ByteRange],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Bytes>>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read exact ranges after verifying the immutable object’s declared length.
Source§fn delete_manifest<'life0, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_manifest<'life0, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete an explicitly identified manifest. GC must supply the identity from durable
checkpoint metadata, never from object listing.
Source§fn delete_node_data<'life0, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_node_data<'life0, 'async_trait>(
&'life0 self,
chunk: StateChunkId,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete an explicitly identified node object after its durable reference count reaches zero.
Source§fn save_subscription_segment<'life0, 'life1, 'async_trait>(
&'life0 self,
segment: &'life1 OutputSegmentRef,
payload: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_subscription_segment<'life0, 'life1, 'async_trait>(
&'life0 self,
segment: &'life1 OutputSegmentRef,
payload: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create an immutable subscription segment, accepting an identical retry only.
Source§fn load_subscription_segment<'life0, 'life1, 'async_trait>(
&'life0 self,
segment: &'life1 OutputSegmentRef,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_subscription_segment<'life0, 'life1, 'async_trait>(
&'life0 self,
segment: &'life1 OutputSegmentRef,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load and verify an exact subscription segment without consulting object listing.
Source§fn delete_subscription_segment<'life0, 'life1, 'async_trait>(
&'life0 self,
object_key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_subscription_segment<'life0, 'life1, 'async_trait>(
&'life0 self,
object_key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete an explicitly unreachable subscription segment.
Source§fn delete_subscription_orphans<'life0, 'life1, 'async_trait>(
&'life0 self,
reachable: &'life1 BTreeSet<String>,
through_checkpoint_id: u64,
grace_before_ms: i64,
) -> Pin<Box<dyn Future<Output = Result<SubscriptionOrphanCleanup, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_subscription_orphans<'life0, 'life1, 'async_trait>(
&'life0 self,
reachable: &'life1 BTreeSet<String>,
through_checkpoint_id: u64,
grace_before_ms: i64,
) -> Pin<Box<dyn Future<Output = Result<SubscriptionOrphanCleanup, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete grace-expired segment objects not present in an authoritative reachable set.
Object listing supplies candidates only;
reachable and through_checkpoint_id are the
caller’s committed-state authority.Source§fn load_manifest<'life0, 'async_trait>(
&'life0 self,
checkpoint_id: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<CheckpointManifest>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_manifest<'life0, 'async_trait>(
&'life0 self,
checkpoint_id: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<CheckpointManifest>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load this node’s exact manifest.
Source§fn load_prepared_sink_descriptor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
manifest: &'life1 CheckpointManifest,
descriptor: &'life2 PreparedSinkDescriptor,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn load_prepared_sink_descriptor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
manifest: &'life1 CheckpointManifest,
descriptor: &'life2 PreparedSinkDescriptor,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Read and verify one prepared sink descriptor.
Source§fn load_sink_artifact_intent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
manifest: &'life1 CheckpointManifest,
intent: &'life2 PreparedSinkArtifactIntent,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn load_sink_artifact_intent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
manifest: &'life1 CheckpointManifest,
intent: &'life2 PreparedSinkArtifactIntent,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, CheckpointStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Read and verify one begin-time sink artifact intent.
Auto Trait Implementations§
impl !RefUnwindSafe for ObjectStoreCheckpointStore
impl !UnwindSafe for ObjectStoreCheckpointStore
impl Freeze for ObjectStoreCheckpointStore
impl Send for ObjectStoreCheckpointStore
impl Sync for ObjectStoreCheckpointStore
impl Unpin for ObjectStoreCheckpointStore
impl UnsafeUnpin for ObjectStoreCheckpointStore
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
Converts
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> ⓘ
Converts
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.