Skip to content

feat(#435): exact ReadProjectionProgressAsync(ShardName) overload#529

Merged
jeremydmiller merged 1 commit into
mainfrom
feature/435-read-progress-by-shardname
Jul 17, 2026
Merged

feat(#435): exact ReadProjectionProgressAsync(ShardName) overload#529
jeremydmiller merged 1 commit into
mainfrom
feature/435-read-progress-by-shardname

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Adds a second, exact per-cell progression read on IEventDatabase alongside the existing (projectionName, tenantId) overload:

ValueTask<ProjectionProgressRow?> ReadProjectionProgressAsync(ShardName name, CancellationToken token);

The caller supplies the full ShardName it already holds (e.g. a cell from AllProjectionProgress), so the store looks up the single row whose stored identity equals name.Identityno version/shard collapsing. A blue/green deploy's versions, a sliced projection's shard keys, and per-tenant partitions each address their own row unambiguously; a ShardKey of All is the projection's global cell, matching the store's "All means the whole projection" convention.

Ships as a default interface member that throws NotSupportedException — same contract as the existing overload (#519): null is the meaningful "no row yet" answer and must not be borrowed by a store that hasn't implemented this. Event stores adopt it in follow-ups (Marten JasperFx/marten, Polecat JasperFx/polecat).

Extends ReadProjectionProgressDefaultsTests (default-throws + implementing-store-returns-a-row for the new overload). Bumps to 2.29.0.

🤖 Generated with Claude Code

…IEventDatabase

Adds a second, exact per-cell progression read alongside the (projectionName, tenantId)
overload: the caller supplies the full ShardName it already holds (e.g. a cell from
AllProjectionProgress), so the store looks up the single row whose stored identity equals
name.Identity with no version/shard collapsing. A blue/green deploy's versions, a sliced
projection's shard keys, and per-tenant partitions each address their own row unambiguously;
a ShardKey of "All" is the projection's global cell, matching the store's "All means the whole
projection" convention.

Ships as a default interface member that throws NotSupportedException (same contract as the
existing overload): null is the meaningful "no row yet" answer and must not be borrowed by a
store that has not implemented this. Event stores (Marten, Polecat) override it against their
progression table in follow-ups.

Bumps to 2.29.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XKKBPsFJ83jd2o4hyGJnj6
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