Skip to content

JasperFx 2.52.1

Choose a tag to compare

@jeremydmiller jeremydmiller released this 19 Aug 15:01
· 205 commits to main since this release

A single fix. Patch release — no API additions, no behavior change for anything that was not already broken.

ShardState.Mode now reports a rebuild (#681, #682)

ShardMode.rebuilding had no writer anywhere in the tree. Every ShardState a SubscriptionAgent published went out with the property's default of continuous — including the ones published during a replay — so a subscriber watching ShardStateTracker could not tell a projection catching up under a rebuild from one running normally. That is the only distinction the enum exists to draw.

The agent already knew which it was; it just knew it on a different enum (ShardExecutionMode) that was never copied onto what it published. So this is propagation, not new state.

What you can now key on. An IObserver<ShardState> sees Mode == ShardMode.rebuilding for every state a shard publishes while replaying — the start, per-batch progress, and a failure — and ShardMode.continuous otherwise. That is enough to tell an operator "this projection is rebuilding, so the sequence you are watching is catch-up progress toward the rebuild's ceiling, not lag".

ShardExecutionMode.CatchUp deliberately maps to continuous. A shard behind the high water mark under normal operation is still continuous: the number being watched is lag either way, and only a rebuild changes what it means.

A finished replay drops back to continuous before its teardown, so the Stopped state disposal publishes does not still claim to be rebuilding — otherwise a consumer tracking the last state it saw would latch on "rebuilding" permanently, from a rebuild that ended cleanly.

ShardMode is now documented, which it was not, because an enum with no writer had no stated meaning. Note in particular that none means "no mode was stored" — it is the default for a persisted progression row, not a running state.

Upgrading

Nothing to do. Marten, Polecat and Fisher all use JasperFx's SubscriptionAgent and ShardStateTracker directly — none of them implements ISubscriptionAgent — so all three pick this up on the package bump with no store-side change and no store release to wait for.

One thing this does not change: Marten's persisted mode column has no writer either, so a ShardState hydrated from the progression table still reports none. That is a separate path from the live tracker and out of scope here.

Full Changelog: V2.52.0...V2.52.1