pub struct ObjectStoreBackend { /* private fields */ }Expand description
Object-store-backed StateBackend.
Implementations§
Source§impl ObjectStoreBackend
impl ObjectStoreBackend
Sourcepub fn new(
store: Arc<dyn ObjectStore>,
instance_id: impl Into<String>,
vnode_capacity: u32,
) -> Self
pub fn new( store: Arc<dyn ObjectStore>, instance_id: impl Into<String>, vnode_capacity: u32, ) -> Self
Wrap an existing [ObjectStore].
Sourcepub fn vnode_capacity(&self) -> u32
pub fn vnode_capacity(&self) -> u32
Vnode range this backend is configured for.
Shared handle to the authoritative version counter. Callers that
want to bump several objects (e.g. backend plus a future metric)
from a single owner can clone this handle instead of relaying
through StateBackend::set_authoritative_version.
Trait Implementations§
Source§impl Debug for ObjectStoreBackend
impl Debug for ObjectStoreBackend
Source§impl StateBackend for ObjectStoreBackend
impl StateBackend for ObjectStoreBackend
Source§fn write_partial<'life0, 'async_trait>(
&'life0 self,
vnode: u32,
epoch: u64,
assignment_version: u64,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_partial<'life0, 'async_trait>(
&'life0 self,
vnode: u32,
epoch: u64,
assignment_version: u64,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Persist a partial aggregate for
(vnode, epoch). Read moreSource§fn read_partial<'life0, 'async_trait>(
&'life0 self,
vnode: u32,
epoch: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_partial<'life0, 'async_trait>(
&'life0 self,
vnode: u32,
epoch: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read the partial aggregate for
(vnode, epoch), if any.Source§fn epoch_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
epoch: u64,
vnodes: &'life1 [u32],
) -> Pin<Box<dyn Future<Output = Result<bool, StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn epoch_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
epoch: u64,
vnodes: &'life1 [u32],
) -> Pin<Box<dyn Future<Output = Result<bool, StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Durability barrier: returns true iff every
vnode in the set
has a partial persisted for epoch. Read moreSource§fn prune_before<'life0, 'async_trait>(
&'life0 self,
before: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prune_before<'life0, 'async_trait>(
&'life0 self,
before: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Garbage-collect every partial and commit marker whose epoch is
strictly less than
before. Called by the checkpoint
coordinator after a successful checkpoint commit so the backend
does not retain state for epochs that can never be recovered. Read moreRaise the backend’s authoritative assignment version — the
minimum
VnodeRegistry::assignment_version it will accept on
write_partial. Hosts call this on boot
after adopting an AssignmentSnapshot and on each subsequent
rotation so stale writers from a deposed leader are fenced out. Read moreCurrent authoritative assignment version.
0 means the fence is
disabled — every caller version is accepted. Backends that do
not fence return 0 unconditionally.Auto Trait Implementations§
impl !Freeze for ObjectStoreBackend
impl !RefUnwindSafe for ObjectStoreBackend
impl Send for ObjectStoreBackend
impl Sync for ObjectStoreBackend
impl Unpin for ObjectStoreBackend
impl UnsafeUnpin for ObjectStoreBackend
impl !UnwindSafe for ObjectStoreBackend
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>
§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>
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> 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.