pub struct WriterContentionDiagnostics {Show 21 fields
pub writer_acquisitions: u64,
pub pooled_writer_acquisitions: u64,
pub standalone_writer_acquisitions: u64,
pub writer_task_acquisitions: u64,
pub writer_acquisition_timeouts: u64,
pub writer_task_begin_busy: u64,
pub writer_task_begin_errors: u64,
pub writer_task_request_failures: u64,
pub writer_task_side_effects_unknown: u64,
pub audit_append_failures: Option<u64>,
pub audit_append_failures_unavailable_reason: Option<String>,
pub audit_batch_flush_failures: Option<u64>,
pub audit_batch_flush_failures_unavailable_reason: Option<String>,
pub audit_degraded_rows: Option<u64>,
pub audit_degraded_rows_unavailable_reason: Option<String>,
pub audit_degraded: Option<bool>,
pub audit_degraded_unavailable_reason: Option<String>,
pub audit_admission_refused_obligations: Option<u64>,
pub audit_admission_refused_obligations_unavailable_reason: Option<String>,
pub audit_admission_unresolved_obligations: Option<u64>,
pub audit_admission_unresolved_obligations_unavailable_reason: Option<String>,
}Expand description
One typed snapshot of writer-contention signals.
writer_acquisitions is the aggregate of the three explicit connection
classes below. writer_acquisition_timeouts remains specific to the
finite-wait pool-mutex stage; standalone SQLite failures and writer-task
BEGIN failures have different ADR-135 F6 stages and are not mislabeled as
pool checkout timeouts. Those stages now carry their OWN failure counters
(writer_task_begin_busy, writer_task_begin_errors) rather than being
absent: refusing to mislabel a failure is not a reason to omit it, and an
omitted failure counter fails toward looking healthy, which is the reading
an operator believes. audit_append_failures is supplied by the runtime
because the audit store lives above khive-db; direct khive-db callers
receive None plus an explicit reason instead of a fabricated zero.
Fields§
§writer_acquisitions: u64Successful acquisitions across pooled, standalone, and writer-task connection classes.
pooled_writer_acquisitions: u64Successful finite-wait main-pool mutex checkouts.
standalone_writer_acquisitions: u64Successful per-operation file-backed standalone writer opens.
writer_task_acquisitions: u64Successful writer-task ownership acquisitions.
writer_acquisition_timeouts: u64Main-pool writer checkouts that exhausted their finite deadline.
writer_task_begin_busy: u64Writer-task BEGIN IMMEDIATE attempts refused busy or locked. These
are the refusals a caller sees as the retryable writer_task_begin_busy
stage, so a nonzero value here has a matching failed request on the
caller’s side rather than being visible only from inside the process.
writer_task_begin_errors: u64Writer-task BEGIN IMMEDIATE attempts that failed for a reason other
than busy or locked.
writer_task_request_failures: u64Dequeued writer-task requests that reached the writer seam and returned error, counted once per request. Sourced directly from the pool’s own acquisition-site counters, so — unlike the runtime-supplied fields below — it is populated identically for every caller.
writer_task_side_effects_unknown: u64Subset of writer_task_request_failures whose terminal state was
WriterTaskRequestState::SideEffectsUnknown.
audit_append_failures: Option<u64>Process-wide audit appends whose errors were logged and swallowed —
pure-observability rows only (config-lock rows, best-effort recall
telemetry). An obligation-bearing row’s commit failure (a gate
denial’s own audit row, a dispatch outcome, an unknown-verb row, or a
git.digest receipt) is never counted here: those either fail the
dispatch that produced them directly (visible to the caller as an
error, not as this counter moving) or, for a denial whose dispatch
already fails independent of the row, are tracked by the runtime’s
own separate obligation-failure counter instead. Summing this field
with audit_batch_flush_failures therefore does not double-count an
obligation-bearing generation failure against this one.
Why audit_append_failures is unavailable to this caller.
audit_batch_flush_failures: Option<u64>Accepted audit-batch generations that reached a terminal non-commit
outcome after retry, including driver death; excludes preflight and
admission rejection. None for a direct khive-db caller, or when no
runtime audit-batch control has been wired into diagnostics.
Why audit_batch_flush_failures is unavailable to this caller.
audit_degraded_rows: Option<u64>Pure-observability audit rows released without a commit. None under
the same conditions as audit_batch_flush_failures.
Why audit_degraded_rows is unavailable to this caller.
audit_degraded: Option<bool>Monotonic process-lifetime flag set once any row has been released
degraded. None under the same conditions as
audit_batch_flush_failures.
Why audit_degraded is unavailable to this caller.
audit_admission_refused_obligations: Option<u64>Per-dispatch audit rows for an explicitly allowlisted, domain-write-free
read verb (VerbRegistry::ADMISSION_DEGRADE_SAFE_VERBS) that were
refused before they could be enqueued on the audit lane
(AuditTerminalReason::QueueAdmissionExhausted) while the dispatch
still reported its own successful result (ADR-103 Amendment 3, ADR-133
Amendment 1). This is a confirmed, terminal accounting loss: the row
never shared a generation with anyone and will never commit, so it
undercounts brain.event_counts’s cost totals for exactly the rows
counted here. Disjoint from audit_degraded_rows (a different reason:
persistent commit failure of a pure-observability row, not admission
pressure) and from audit_admission_unresolved_obligations (a row that
was enqueued and may still commit). None under the same conditions as
audit_batch_flush_failures.
Why audit_admission_refused_obligations is unavailable to this caller.
audit_admission_unresolved_obligations: Option<u64>Per-dispatch audit rows for an explicitly allowlisted, domain-write-free
read verb (VerbRegistry::ADMISSION_DEGRADE_SAFE_VERBS) that were
already enqueued but had not resolved when the caller’s admission
wait deadline elapsed (AuditTerminalReason::AdmissionDeadlineExpired)
while the dispatch still reported its own successful result (ADR-103
Amendment 3, ADR-133 Amendment 1). Unlike
audit_admission_refused_obligations, a row counted here is not a
confirmed loss — it may still be committed by the generation driver
independently of the caller’s timeout — so this field is an upper
bound on the eventual undercount, not the undercount itself. None
under the same conditions as audit_batch_flush_failures.
Why audit_admission_unresolved_obligations is unavailable to this
caller.
Trait Implementations§
Source§impl Clone for WriterContentionDiagnostics
impl Clone for WriterContentionDiagnostics
Source§fn clone(&self) -> WriterContentionDiagnostics
fn clone(&self) -> WriterContentionDiagnostics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WriterContentionDiagnostics
impl Debug for WriterContentionDiagnostics
impl Eq for WriterContentionDiagnostics
impl StructuralPartialEq for WriterContentionDiagnostics
Auto Trait Implementations§
impl Freeze for WriterContentionDiagnostics
impl RefUnwindSafe for WriterContentionDiagnostics
impl Send for WriterContentionDiagnostics
impl Sync for WriterContentionDiagnostics
impl Unpin for WriterContentionDiagnostics
impl UnsafeUnpin for WriterContentionDiagnostics
impl UnwindSafe for WriterContentionDiagnostics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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 more