Skip to content

fix(marten#4953): CheckNowAsync targets the committed ceiling, time-bounded#530

Merged
jeremydmiller merged 1 commit into
mainfrom
fix/4953-checknow-committed-ceiling
Jul 18, 2026
Merged

fix(marten#4953): CheckNowAsync targets the committed ceiling, time-bounded#530
jeremydmiller merged 1 commit into
mainfrom
fix/4953-checknow-committed-ceiling

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Half of the fix for marten discussion #4953 (silent async-daemon event skips under concurrent appends); the Marten-side transaction-evidence gating rides in the companion Marten PR.

CheckNowAsync — driven with no staleness gating by projection rebuilds, PrepareForRebuildsAsync, and daemon catch-up — looped DetectInSafeZone until the mark reached HighWaterStatistics.HighestSequence. That value can be a database sequence's last_value, which includes numbers merely reserved by in-flight or rolled-back transactions, so the loop either pressured safe-zone detection into skipping over in-flight appends (rebuild/catch-up during an import silently lost their events) or could spin forever on a rolled-back tail.

  • New IHighWaterDetector.FetchCommittedHighWaterCeilingAsync DIM (default preserves prior behavior; Marten overrides with max(seq_id))
  • CheckNowAsync loops to the committed ceiling — reachable by definition — so a detector that holds before in-flight gaps makes the loop wait for the appends to land instead of skipping them
  • Loop is time-bounded (CheckNowTimeout, default 5 min) with a warning when it proceeds early

Bumps version to 2.29.1 for an incremental publish.

🤖 Generated with Claude Code

…d (2.29.1)

CheckNowAsync — driven with no staleness gating by projection rebuilds,
PrepareForRebuildsAsync, and daemon catch-up — looped DetectInSafeZone until
the high water mark reached HighWaterStatistics.HighestSequence. That value
can be a database sequence's last_value, which includes numbers merely
RESERVED by in-flight or rolled-back transactions, so the loop either
pressured safe-zone detection into skipping over in-flight appends (a rebuild
or catch-up during an import silently lost their events once they committed)
or could spin forever on a rolled-back tail.

- New IHighWaterDetector.FetchCommittedHighWaterCeilingAsync DIM: the highest
  COMMITTED sequence. Default preserves prior behavior (Detect().HighestSequence)
  so existing detectors are unchanged; Marten overrides with max(seq_id).
- CheckNowAsync loops to that committed ceiling — reachable by definition — so
  a detector that holds before in-flight gaps (Marten's #4953 transaction-
  evidence gating) simply makes the loop WAIT for the appends to land.
- The loop is time-bounded (CheckNowTimeout, default 5 minutes) and logs a
  warning when it proceeds without reaching the ceiling.

Three new HighWaterAgent tests; existing daemon suite green on net9/net10.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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