Skip to main content

ObjectStoreCheckpointStore

Struct ObjectStoreCheckpointStore 

Source
pub struct ObjectStoreCheckpointStore { /* private fields */ }
Expand description

Checkpoint store backed by any [ObjectStore] implementation.

Implementations§

Source§

impl ObjectStoreCheckpointStore

Source

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.

Source

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.

Source

pub fn with_participant_id(self, participant_id: u64) -> Self

Bind the store to one nonzero node id.

Source

pub fn with_key_group_count(self, key_group_count: KeyGroupCount) -> Self

Set the exact vnode topology.

Source

pub fn with_max_node_data_bytes( self, limit: u64, ) -> Result<Self, CheckpointStoreError>

Set the node-object byte limit.

§Errors

Returns an error for zero or unrepresentable limits.

Trait Implementations§

Source§

impl CheckpointStore for ObjectStoreCheckpointStore

Source§

fn max_node_data_bytes(&self) -> u64

Maximum bytes admitted for one node data object.
Source§

fn key_group_count(&self) -> KeyGroupCount

Stable vnode count expected in manifests.
Source§

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

Read and verify one begin-time sink artifact intent.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

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

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
§

impl<T> Pointee for T

§

type Metadata = ()

The metadata type for pointers and references to this type.
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more