Bump JasperFx to 2.28.0; declare EventProjection doc types for rebuild teardown (#4685 COPY)#4969
Merged
Merged
Conversation
…ld teardown Bumps the four JasperFx packages 2.27.0 -> 2.28.0. Beyond the #524 defense-in-depth (HighWaterAgent guards IDaemonWakeup throws + the watchdog observes the real loop task) and the opt-in #525 deferred rebuild writes (default off), 2.28.0 carries #522, which stops TimeoutAfterAsync from swallowing a rebuild fault. That correctly surfaces a pre-existing bug in the binary-COPY rebuild tests: an EventProjection that writes documents via ad-hoc ops.Insert cannot have those types inferred, so Marten never wiped them on rebuild. The per-row path tolerated that (re-insert upserts), but the INSERT-only COPY rebuild assumes a truncated table and hit a 23505 duplicate key — a failure that was silently swallowed on 2.27.0. This is a long-standing EventProjection limitation (Marten can't know a projection's ad-hoc ops.Insert/Store types), not a regression. Fix: the affected test projections declare their written type via Options.DeleteViewTypeOnTeardown<BulkCopyDoc>() so the rebuild TRUNCATEs it first, and the EventProjection docs now document the requirement. Verified: all 9 rebuild_with_bulk_copy_inserts tests pass against the published JasperFx.Events 2.28.0 (net10.0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XKKBPsFJ83jd2o4hyGJnj6
This was referenced Jul 18, 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.
Lands the JasperFx 2.27.0 → 2.28.0 bump and fixes a pre-existing binary-COPY rebuild bug that 2.28.0 unmasks.
What 2.28.0 brings
HighWaterAgenttreatsIDaemonWakeupas untrusted (guards everyWaitAsyncin the poll loop) and the restart watchdog observes the real unwrapped loop task, so a wakeup throw can't permanently freeze projection progress and a faulted loop self-heals. (Completes the defense-in-depth behind thePostgresqlListenWakeupfix in fix(#4961): PostgresqlListenWakeup falls back to a timeout wait when the DB is unreachable #4965 / Async daemon stops projecting permanently after a brief DB outage whenUseListenNotifyForEventAppendsis enabled —HighWaterAgentloop dies and is never restarted #4961.)TimeoutAfterAsyncno longer swallows a rebuild fault.The pre-existing bug #522 surfaced
rebuild_with_bulk_copy_inserts(the #4685 binary-COPY rebuild tests) began failing with23505 duplicate key. Root cause, confirmed with a direct detector run at V2.27.0, #480, and 2.28.0 (the collision fires at all three — 2.27.0 just swallowed the fault, so the test passed falsely):An
EventProjectionwrites documents via ad-hocops.Insert/ops.Store, so Marten cannot infer which document types it produces and never wiped them on rebuild. The per-row path tolerated stale docs (re-insert upserts), but the INSERT-only binary COPY rebuild assumes a truncated table and collides. This is a long-standingEventProjectionlimitation, not a regression, and (per maintainer direction) not something we change — anEventProjectionmust declare the types it writes.Fix
Options.DeleteViewTypeOnTeardown<BulkCopyDoc>(), so the rebuild TRUNCATEs it first.docs/events/projections/event-projections.mddocuments the requirement (and that INSERT-only COPY rebuilds require it).Verified: all 9
rebuild_with_bulk_copy_insertstests pass against the published JasperFx.Events 2.28.0 (net10.0).🤖 Generated with Claude Code