Populate SkippedEventsCount in tracker + fix MaxEventSequence xmldoc (closes #281)#282
Merged
jeremydmiller merged 1 commit intoMay 16, 2026
Conversation
…doc (closes #281) - ShardStateTracker.MarkSkippingAsync now computes newHighWaterMark - lastKnownGoodHighWaterMark and assigns it to ShardState.SkippedEventsCount when positive (null when no advance, preserving the "n/a vs. zero" distinction CritterWatch relies on). - EventStoreUsage.MaxEventSequence xmldoc corrected: the Marten shape is `SELECT max(seq_id) FROM {schema}.mt_events`, not max(sequence) from mt_streams. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
26 tasks
thechucklingatom
pushed a commit
to thechucklingatom/jasperfx
that referenced
this pull request
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two-part follow-up to #279.
Summary
ShardStateTracker.MarkSkippingAsyncnow populatesShardState.SkippedEventsCountwithnewHighWaterMark - lastKnownGoodHighWaterMark, leaving itnullwhen the delta is non-positive so CritterWatch can keep rendering "n/a" vs. "0" distinctly.EventStoreUsage.MaxEventSequencexmldoc corrected — the Marten shape isSELECT max(seq_id) FROM {schema}.mt_events, notmax(sequence) FROM mt_streams. Doc-only change.Tests
Added two cases to
ShardStateTrackerTests:mark_skipping_populates_skipped_events_count—MarkSkippingAsync(100, 105)⇒SkippedEventsCount == 5mark_skipping_with_no_advance_leaves_skipped_events_count_null—MarkSkippingAsync(100, 100)⇒SkippedEventsCount == nulldotnet build jasperfx.slnclean,dotnet test src/EventTests270/270 pass.Cross-link / follow-up (not in this PR)
Once this lands and JasperFx.Events alpha.10 is published:
src/Marten/Events/Daemon/HighWater/SkippedEventsCountObserver.cs(the workaround that back-filledSkippedEventsCountfrom observedShardStates).Closes #281.
🤖 Generated with Claude Code