pub struct RuntimeReadiness {
pub stopping: bool,
pub snapshots_ready: bool,
pub background_healthy: bool,
pub accounting_healthy: bool,
pub eligible_accounts: usize,
pub unfundable_accounts: usize,
pub unmanaged_accounts: usize,
pub unresolved_principals: u64,
/* private fields */
}Expand description
Whether this instance can admit work now, and which condition withdrew it
when it cannot (INVARIANTS.md 10). From RuntimeHandle::readiness.
is_ready is the probe’s answer; the fields are its
inputs, for diagnosis.
Fields§
§stopping: boolShutdown has been requested, or the runtime owner was dropped. Readiness is withdrawn for good.
snapshots_ready: boolThe snapshot task is alive and ready, and current resolutions meet the
tracking rule: with TrackedPrincipals::Fixed every tracked
principal is resolved; with TrackedPrincipals::All at least one is,
or none is tracked.
background_healthy: boolThe supervisor and snapshot task are alive, no background failure has been recorded, no account is faulted, and every eligible account has a healthy running or lingering manager.
accounting_healthy: boolThe usage writer is open, has recorded no lost or rejected
events, and its queue is below capacity. A sticky lost or rejected
keeps this false for the rest of the process’s life.
eligible_accounts: usizeAccounts with at least one active, unexpired snapshot.
unfundable_accounts: usizeEligible accounts that cannot fund work now: no usable lease with
units remaining and no elastic overage headroom. With Fixed
tracking any such account withdraws readiness; with All, readiness
needs only some eligible account to be fundable.
unmanaged_accounts: usizeEligible accounts without a healthy running or lingering lease
manager: starting, backing off after a crash, retiring or faulted.
Nonzero withdraws readiness through background_healthy.
unresolved_principals: u64Tracked principals with no currently valid resolution (neither an unexpired snapshot nor an unexpired negative entry).
Implementations§
Source§impl RuntimeReadiness
impl RuntimeReadiness
Sourcepub fn is_ready(&self) -> bool
pub fn is_ready(&self) -> bool
True only when the runtime is not stopping, snapshots are ready,
background tasks and accounting are healthy, and the funding rule
holds: with no account holding a published snapshot, trivially; with
All tracking, some
eligible account is fundable; with Fixed, at least one account is
eligible and every eligible account is fundable.