Skip to content

fix(transactions): improve recovery liveness and diagnostics - #10374

Merged
ReubenBond merged 4 commits into
dotnet:mainfrom
ReubenBond:reubenbond-transaction-recovery-upstream-pr
Aug 10, 2026
Merged

ReubenBond merged 4 commits into
dotnet:mainfrom
ReubenBond:reubenbond-transaction-recovery-upstream-pr

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 8, 2026

Copy link
Copy Markdown
Member

Depends on #10378 and should be rebased/merged after it. The expected rebase resolution in TransactionQueue.AbortAndRestoreCore preserves #10378's discarded-batch completion around #10374's correlated restore/diagnostics; TransactionQueueStorageWorkTests also needs the new diagnostic identity constructor argument. This combined resolution has been validated on net8.0 and net10.0.

Transaction recovery can linger after orphaned managers, while the existing diagnostics do not expose enough activation, role, phase, lock, restore, and cancellation state to explain liveness failures.

This change adds provider-neutral transaction recovery diagnostics, adaptive recovery-ping retries, and bounded failure detection with explicit outcomes. Local transaction-manager aborts dispatch every target in exactly one manager-owned cancel fan-out before publishing the durable abort decision, preventing TransactionAgent duplication and avoiding the caller response deadline depending on remote cleanup. The already-dispatched cleanup remains observed and is bounded locally by activation cancellation and the configured lock-timeout budget while retaining the original abort status.

Storage-write diagnostics carry the exact committed transaction IDs, so durable local-commit cleanup gates can only be released by confirmation of the gated transaction rather than an unrelated recovery probe. Deterministic phase gates cover manager wait, persisted remote prepare, durable local commit before matching confirmation/collection, and activation cancellation during blocked cancel fan-out. Azure Storage and DynamoDB suites include the provider-backed recovery cases.

Microsoft Reviewers: Open in CodeFlow

@ReubenBond
ReubenBond force-pushed the reubenbond-transaction-recovery-upstream-pr branch 5 times, most recently from f5cc913 to ad02350 Compare August 10, 2026 00:05
ReubenBond and others added 4 commits August 9, 2026 17:42
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 926dfb31-52fb-4a8a-8af8-6a9fe3d0e152
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Honor absolute watchdog deadlines even when a timer wakes early, and allow targeted recovery attempts to complete transparently after the owning silo is terminated.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: a9491034-9b04-4ca3-b96b-949371ffea34
@ReubenBond
ReubenBond force-pushed the reubenbond-transaction-recovery-upstream-pr branch from ad02350 to 693e7a4 Compare August 10, 2026 00:44
@ReubenBond
ReubenBond merged commit 1f6fae5 into dotnet:main Aug 10, 2026
66 of 67 checks passed
@ReubenBond
ReubenBond deleted the reubenbond-transaction-recovery-upstream-pr branch August 10, 2026 01:19
This was referenced Aug 28, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant