pub struct BackupHandle {
pub error_count: Arc<AtomicU64>,
pub last_success_ts: Arc<AtomicU64>,
pub healthy: Arc<AtomicBool>,
pub lag_s: Arc<AtomicU64>,
pub lease_held: Arc<AtomicBool>,
pub reason: Arc<Mutex<Option<String>>>,
pub join: JoinHandle<()>,
}Expand description
The running worker, as the serve loop holds it.
There is one way to stop it: send BackupTrigger::Shutdown (or drop the
sender), then await join. It finishes within shutdown_grace_ms, however
unresponsive the bucket is.
Fields§
§error_count: Arc<AtomicU64>Failed steps since start (mushroomdb_backup_upload_errors_total).
last_success_ts: Arc<AtomicU64>Unix seconds of the last moment everything durable was shipped; 0 before the first.
healthy: Arc<AtomicBool>False after UNHEALTHY_AFTER_FAILURES consecutive failures, while
durable data has stayed unshipped for longer than
max(30 s, 10 × wal_interval), or for good once the worker has
stopped; true otherwise.
lag_s: Arc<AtomicU64>backup_lag_s: seconds the oldest durable, unshipped WAL byte has
waited; 0 when everything durable is shipped.
lease_held: Arc<AtomicBool>Whether this worker holds the bucket lease right now: false while another instance holds it, after the lease is lost or cannot be renewed, and once the worker has released it.
reason: Arc<Mutex<Option<String>>>Why the worker is unhealthy, while it is; once it has stopped, why it
stopped ("stopped" after a shutdown, the panic message after a panic).
join: JoinHandle<()>Finishes when the worker has flushed and stopped.
Trait Implementations§
Auto Trait Implementations§
impl Forget for BackupHandle
impl Freeze for BackupHandle
impl RefUnwindSafe for BackupHandle
impl Send for BackupHandle
impl Sync for BackupHandle
impl Unpin for BackupHandle
impl UnsafeUnpin for BackupHandle
impl UnwindSafe for BackupHandle
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.