pub struct PvCounters {
pub events_received: AtomicU64,
pub events_stored: AtomicU64,
pub first_event_unix_secs: AtomicI64,
pub buffer_overflow_drops: AtomicU64,
pub timestamp_drops: AtomicU64,
pub type_change_drops: AtomicU64,
pub disconnect_count: AtomicU64,
pub last_disconnect_unix_secs: AtomicI64,
pub transient_error_count: AtomicU64,
pub latest_observed_dbr: AtomicI32,
pub metadata_fetch_failures: AtomicU64,
pub storage_append_timeouts: AtomicU64,
}Expand description
Per-PV diagnostic counters for the BPL drop / rate / connection
reports. All counts are monotonic across the PV’s lifetime; the
rate handlers compute deltas against first_event_unix_secs.
Tracked here (not in ConnectionInfo) so they survive transient disconnects and are read lock-free from the report endpoints.
Fields§
§events_received: AtomicU64Total events produced by monitor/scan, including those that later got dropped before write.
events_stored: AtomicU64Total events successfully written to storage.
first_event_unix_secs: AtomicI64Unix-epoch seconds of the first event we ever saw for this PV. 0 = “no event yet” (i64 because Atomic<Option<…>> doesn’t exist).
buffer_overflow_drops: AtomicU64Number of events the bounded sample channel rejected (write
loop falling behind producer). Surfaces as
getDroppedEventsBufferOverflowReport.
timestamp_drops: AtomicU64Number of events whose timestamp went backwards relative to the
previously-stored event. Java archiver’s
DroppedEventsTimestampReport.
type_change_drops: AtomicU64Number of events whose runtime DBR type didn’t match the PvRecord’s stored type — the engine drops these because mixing types in one PB partition would corrupt downstream readers.
disconnect_count: AtomicU64Number of disconnect transitions seen on this PV’s CA channel.
LostConnectionsReport.
last_disconnect_unix_secs: AtomicI64Last unix-epoch seconds of disconnect transition.
transient_error_count: AtomicU64Number of transient subscribe / monitor-recv / scan-read errors
(Java parity 8fe73eb). Distinct from disconnect_count —
these are recoverable per-attempt failures rather than confirmed
link drops.
latest_observed_dbr: AtomicI32Latest DBR type observed from CA that did not match the
archive-time recorded type (Java parity 9f2234f). -1 = no
mismatch ever seen.
metadata_fetch_failures: AtomicU64Number of DBR_CTRL metadata refresh attempts that failed (timeout, transport error, missing display info). Operators looking at PVs with empty PREC/EGU should check this.
storage_append_timeouts: AtomicU64Number of storage.append_event_with_meta calls that exceeded
the per-sample storage timeout. Distinct from
buffer_overflow_drops (mpsc channel saturation) so an
operator can tell “the storage tier is wedged” apart from
“the writer can’t keep up with the producer”.