Expand description
MVCC conflict analytics and observability infrastructure.
Provides shared types and utilities for conflict tracing, metrics aggregation, and diagnostic logging across the FrankenSQLite MVCC layer.
§Design Principles
- Zero-cost when unused: All observation is opt-in via the
ConflictObservertrait. When no observer is registered, conflict emission compiles to nothing (the defaultNoOpObserveris inlined). - Non-blocking: Observers MUST NOT acquire page locks or block writers. Conflict tracing is purely diagnostic.
- Shared foundation: Types defined here are reused by downstream observability beads (bd-t6sv2.2, .3, .5, .6, .8, .12).
Structs§
- Conflict
Metrics - Aggregated conflict statistics exposed via PRAGMA.
- Conflict
Metrics Snapshot - Serializable snapshot of conflict metrics.
- Conflict
Ring Buffer - Fixed-capacity ring buffer for storing recent conflict events.
- CxPropagation
Metrics - Atomic counters for Cx propagation telemetry.
- CxPropagation
Metrics Snapshot - Serializable snapshot of Cx propagation metrics.
- IoUring
Latency Metrics - IoUring
Latency Snapshot - Metrics
Observer - Combined observer that records events to both a
ConflictMetricsaggregator and aConflictRingBufferfor detailed logging. - NoOp
Observer - No-op observer that compiles to nothing. Default when observability is not configured.
- Trace
Metrics Snapshot - Snapshot of structured tracing counters.
- TxnSlot
Metrics - Atomic counters for TxnSlot lifecycle telemetry.
- TxnSlot
Metrics Snapshot - Serializable snapshot of TxnSlot telemetry counters.
Enums§
- Conflict
Event - A single conflict event emitted by the MVCC layer.
- SsiAbort
Category - Categorized SSI abort reason (serialization-friendly).
Statics§
- GLOBAL_
CX_ PROPAGATION_ METRICS - Global Cx propagation metrics singleton.
- GLOBAL_
IO_ URING_ LATENCY_ METRICS - Global io_uring latency metrics singleton.
- GLOBAL_
TXN_ SLOT_ METRICS - Global TxnSlot observability metrics singleton.
Traits§
- Conflict
Observer - Observer trait for conflict events.
Functions§
- io_
uring_ latency_ snapshot - next_
decision_ id - Allocate the next decision identifier.
- next_
trace_ id - Allocate the next trace identifier.
- record_
compat_ trace_ callback - Record a sqlite3_trace_v2 compatibility callback invocation.
- record_
io_ uring_ read_ latency - record_
io_ uring_ unix_ fallback - record_
io_ uring_ write_ latency - record_
trace_ export - Record an export batch for tracing spans.
- record_
trace_ export_ error - Record a failed span-export attempt.
- record_
trace_ span_ created - Record creation of a tracing span in the SQL pipeline.
- reset_
io_ uring_ latency_ metrics - reset_
trace_ metrics - Reset trace counters to zero (tests/diagnostics).
- trace_
metrics_ snapshot - Read a point-in-time snapshot of trace counters.