Skip to content

watch_applied: report how long a store apply has been in flight - #35

Merged
jaredLunde merged 1 commit into
mainfrom
jared/watch-apply-probe
Nov 18, 2026
Merged

jaredLunde merged 1 commit into
mainfrom
jared/watch-apply-probe

Conversation

@jaredLunde

Copy link
Copy Markdown
Contributor

SnapshotStore::apply runs on a blocking task with no timeout. If it hangs, the watch stops advancing while the rest of the process stays healthy, and the consumer has no signal.

This adds ApplyProbe, set through BatchConfig::apply_probe. probe.in_flight() returns the age of the current apply, counted from handoff to the blocking pool. It clears when the apply returns, panics, or never starts.

BatchConfig is no longer Copy, so this bumps to 0.9.0. BatchConfig::default() callers do not change. Merging publishes the release.

Verified

  • cargo test --lib --tests --features fjall,rocksdb,transport: all pass, including Stateright models and DST; the MinIO tests pass run serially
  • cargo test --lib --tests with model-named tests skipped: pass
  • Removing the probe start makes the hung-apply test fail; never clearing it fails both new tests
  • cargo fmt --check, dprint check, cargo clippy --all-targets --all-features -- -D warnings, cargo doc --no-deps --all-features

🤖 Generated with Claude Code

A store apply runs on a blocking task with no timeout. If it never returns,
the watch stops advancing while the rest of the process stays healthy, and
nothing tells the consumer.

Add ApplyProbe through BatchConfig::apply_probe. in_flight() returns the age
of the current apply, counted from handoff to the blocking pool, so time
spent waiting for a blocking thread is included. A guard held by the blocking
task clears it when the apply returns, panics or never starts.

BatchConfig is no longer Copy, so this is 0.9.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jaredLunde
jaredLunde merged commit e1f909c into main Nov 18, 2026
1 check passed
@jaredLunde
jaredLunde deleted the jared/watch-apply-probe branch November 18, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant