pub struct LocalSnapshotStore { /* private fields */ }Expand description
Bytes live on the local filesystem under a root directory.
Implementations§
Trait Implementations§
Source§impl Clone for LocalSnapshotStore
impl Clone for LocalSnapshotStore
Source§fn clone(&self) -> LocalSnapshotStore
fn clone(&self) -> LocalSnapshotStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LocalSnapshotStore
impl Debug for LocalSnapshotStore
Source§impl SnapshotStore for LocalSnapshotStore
impl SnapshotStore for LocalSnapshotStore
Source§fn upload<'a>(
&'a self,
key: SnapshotKey,
bytes: Vec<u8>,
) -> SnapshotStoreFuture<'a, SnapshotLocation>
fn upload<'a>( &'a self, key: SnapshotKey, bytes: Vec<u8>, ) -> SnapshotStoreFuture<'a, SnapshotLocation>
Persist a snapshot blob and return its location. Stores own naming and
MAY ignore parts of
key (Inline does).Source§fn download<'a>(
&'a self,
location: &'a SnapshotLocation,
) -> SnapshotStoreFuture<'a, Vec<u8>>
fn download<'a>( &'a self, location: &'a SnapshotLocation, ) -> SnapshotStoreFuture<'a, Vec<u8>>
Retrieve a snapshot blob given its location.
Source§fn delete<'a>(
&'a self,
location: &'a SnapshotLocation,
) -> SnapshotStoreFuture<'a, ()>
fn delete<'a>( &'a self, location: &'a SnapshotLocation, ) -> SnapshotStoreFuture<'a, ()>
Best-effort delete; missing is not an error.
Source§fn health_check(&self) -> SnapshotStoreFuture<'_, ()>
fn health_check(&self) -> SnapshotStoreFuture<'_, ()>
Lightweight liveness probe for the backend, used by the snapshot driver
to detect local S3 loss WITHOUT triggering a
build_snapshot (whose
failure openraft treats as fatal). The default is “always healthy”:
in-memory and local-filesystem backends cannot be remotely unavailable.
The S3 backend overrides this with a cheap stat.Source§fn verify_uploaded<'a>(
&'a self,
_location: &'a SnapshotLocation,
) -> SnapshotStoreFuture<'a, ()>
fn verify_uploaded<'a>( &'a self, _location: &'a SnapshotLocation, ) -> SnapshotStoreFuture<'a, ()>
Verify that a freshly-uploaded snapshot is actually retrievable from
the backend. Called immediately after
upload returns Ok, before the
new pointer is published. Catches silent partial-success modes
(multipart upload Init/Part Ok but Complete failed, opendal retry
returning Ok on cached state, etc.) that would otherwise leave
current_snapshot pointing at a 404. Default no-op for backends that
can’t lie about persistence (Inline keeps bytes in the pointer; Local
uses a single fs syscall whose Ok means present). The S3 backend
overrides this with a stat round-trip.Auto Trait Implementations§
impl Freeze for LocalSnapshotStore
impl RefUnwindSafe for LocalSnapshotStore
impl Send for LocalSnapshotStore
impl Sync for LocalSnapshotStore
impl Unpin for LocalSnapshotStore
impl UnsafeUnpin for LocalSnapshotStore
impl UnwindSafe for LocalSnapshotStore
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
Mutably borrows from an owned value. Read more