Skip to content

JasperFx 2.88.0: prove a failed Rebuild-mode run can be restarted and finished (#5668) - #5669

Merged
jeremydmiller merged 2 commits into
masterfrom
jasperfx-1015-rebuild-resume
Oct 14, 2026
Merged

jeremydmiller merged 2 commits into
masterfrom
jasperfx-1015-rebuild-resume

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Closes #5668.

What's here

  • JasperFx 2.88.0. It brings in JasperFx/jasperfx#1015: IProjectionDaemon.StartAgentInRebuildModeAsync(ShardName, ct), which starts a projection shard in Rebuild mode. The shard publishes no side effects, keeps following the store past the high-water mark, and resumes from its own persisted progress instead of rewinding to 0. This is for the blue/green warm-up node role in Blue/green: let a node run projection agents without doing any messaging wolverine#4569.
  • DaemonTests.rebuild_mode_start_resumes_after_a_failure proves that a Rebuild-mode run that fails partway through can be stopped, fixed, restarted and finished. Extended progression tracking is on, and there's no other schema change.
    1. Set up 100 one-event streams, so a document folded twice ends up with Count == 2. BatchSize = 10, so several pages commit before the failure.
    2. The projection throws on event 60, and the shard pauses. The test checks that the committed progress sits between 0 and the high-water mark, and that extended tracking wrote the failure columns.
    3. Stop the shard, clear the fault, and start it in Rebuild mode again. The run finishes:
      • every document is folded exactly once;
      • no event at or below the first run's committed mark is applied twice;
      • the failure columns clear;
      • the shard keeps following newly appended events.

Verification

  • Against published JasperFx 2.88.0: the new test passes, and EventSourcingTests.projection_side_effect_compliance passes 12/12. That count includes the three facts Child list can not be populated #1015 added to ProjectionSideEffectCompliance.
  • Negative control, run against a local JasperFx pack with Child list can not be populated #1015's resume logic disabled: the new test fails as it should. The 50 committed documents end with Count == 2, because the restart rewinds to 0 and replays over them.
  • Earlier, against a local pack of the Child list can not be populated #1015 branch, the new test passed 3 times out of 3.

🤖 Generated with Claude Code

jeremydmiller and others added 2 commits October 14, 2026 14:35
…s committed progress

JasperFx/jasperfx#1015 (wolverine#4569) adds IProjectionDaemon.StartAgentInRebuildModeAsync. This
test starts a shard that way with extended progression tracking on and no other schema change,
makes the projection throw part way through so the shard pauses, then stops it, clears the fault
and starts it in Rebuild mode again. The second run finishes from the progress the first run
committed: every document is folded exactly once, no committed event is applied twice, the failure
columns clear, and the shard keeps following the store afterwards.

Against a JasperFx build without #1015's resume logic the same test fails: the 50 committed
documents end with Count == 2, because the restart rewinds to 0 and replays over them.

Requires a JasperFx release containing #1015. Validated locally against a 2.87.2-local.1 pack,
which is not part of this commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Picks up JasperFx/jasperfx#1015: IProjectionDaemon.StartAgentInRebuildModeAsync and the three new ProjectionSideEffectCompliance facts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeremydmiller
jeremydmiller merged commit 4c6762d into master Oct 14, 2026
32 checks passed
@jeremydmiller
jeremydmiller deleted the jasperfx-1015-rebuild-resume branch October 14, 2026 21:27
This was referenced Oct 16, 2026
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.

Upgrade to the JasperFx release with jasperfx#1015 and cover restarting a failed Rebuild-mode run

1 participant