~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

pds_firehose_seq reads the seqs reserved, not the last event's, until a run's first event

Open
Open chadtmiller.com opened this issue 0 comments

spec/OPERATIONS.md says pds_firehose_seq is the seq of the firehose's last event. After a start, until the run numbers its first event, the server gives the greatest seq it has reserved, which is past the last event's (ops/metrics.rs writes svc.events.published(); a start sets that to the reserved ceiling unless it loaded every account, events::Firehose::new).

The harness does not see it: checkOperations writes its canary record before it reads the metrics, so the run has numbered an event by then.

What would fix it

  • The server: the metric from Firehose::last_made(published), which is the last event made once the events before the start are found, and the last the service log tells of until then.
  • The harness: the metrics scraped after a restart and before any write, held to the last seq a subscription was sent before it.

Found while explaining a failure of the metrics check that was the check's own (the pull that fixes its wait names this issue). A related case: after a write that fails at the tail of the log, published() is the seq of the hole it left until the next event lands.