Skip to content

Reshape the persistence contracts for groups, redirects and retry batches - #5686

Merged
johnsimons merged 2 commits into
masterfrom
john/raven_refactor
Aug 3, 2026
Merged

Reshape the persistence contracts for groups, redirects and retry batches#5686
johnsimons merged 2 commits into
masterfrom
john/raven_refactor

Conversation

@johnsimons

@johnsimons johnsimons commented Aug 3, 2026

Copy link
Copy Markdown
Member

Renames and reshapes three persistence contracts, plus the RavenDB implementations and API call that follow from them. Split out of the EF Core persister stack so the RavenDB and API changes on their own and don't complicate a release.

No EF Core behaviour changes here: those stores are still stubs, updated only to the new signatures.

Changes

Failure groups. IGroupsDataStore members are named for the status they read:
GetUnresolvedGroupsByClassifier, GetArchivedGroupsByClassifier, GetUnresolvedGroup,
GetArchivedGroup. The two by-id lookups previously differed only in which index they read, which
neither the names nor the signatures showed. GetUnresolvedGroup returns a single view like its
archived twin, so neither controller picks the first item off a list.

QueryFailureGroupViewOnGroupId is deleted, since it ran the same query as GetUnresolvedGroup, and
RetryAllInGroupHandler uses IGroupsDataStore. GetCurrentForwardingBatch moves to the retry
store, next to the NowForwarding document it reads, and returns a ForwardingRetryBatch describing
the operation rather than a RetryBatch whose message list the caller never reads.

Message redirects. IMessageRedirectsDataStore exposes AddRedirect, UpdateRedirect and
RemoveRedirect instead of Save(collection), since every caller changes one redirect at a time.
GetRedirects still returns all of them for the API's duplicate and dependents validation. The
document type moves into the RavenDB project with its stored shape, id and tick based timestamp
unchanged; the shared model keeps the redirect itself, with the lookups as extension methods.
IRetryBatchesManager.GetOrCreateMessageRedirectsCollection duplicated the store's read, so it is
removed and RetryProcessor takes IMessageRedirectsDataStore.

Retry batches. IRetryDocumentDataStore becomes IRetryBatchStore, with CreateBatch,
AssignMessagesToBatch, GetOrphanedBatches and GetAvailableBatchGroups. The four
GetBatchesFor* members returned no batches at all, they enumerate the messages a retry request
covers, so they are now ForEachUnresolvedMessage and friends, minus cutoff, groupTitle and
groupType, which no implementation used.

API behaviour changes

  • GET api/recoverability/groups/id/{id} and GET api/archive/groups/id/{id} return 404 for an
    unknown group instead of an empty 204, matching GetErrorByIdController. ServicePulse reads these
    only to label a group and currently fails on the empty 204 anyway.
  • The redirect GET endpoints derive their ETag from the payload rather than the document change
    vector. Still deterministic, so conditional requests keep working; clients see one cache miss
    after deploy.

@johnsimons
johnsimons requested a review from rbev August 3, 2026 05:54
@johnsimons johnsimons self-assigned this Aug 3, 2026
@johnsimons johnsimons changed the title Refactors based on implementing EF persistence Reshape the persistence contracts for groups, redirects and retry batches Aug 3, 2026
@johnsimons
johnsimons force-pushed the john/raven_refactor branch from 7507968 to e1d0056 Compare August 3, 2026 06:08
@johnsimons
johnsimons enabled auto-merge August 3, 2026 06:09
@johnsimons
johnsimons merged commit 9793bf1 into master Aug 3, 2026
37 checks passed
@johnsimons
johnsimons deleted the john/raven_refactor branch August 3, 2026 06:33
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.

2 participants