Skip to content

Release the retry claim in SQL when a retry fails to send - #6182

Merged
johnsimons merged 1 commit into
masterfrom
warwick/sql-revert-retry-releases-claim
Nov 25, 2026
Merged

johnsimons merged 1 commit into
masterfrom
warwick/sql-revert-retry-releases-claim

Conversation

@warwickschroeder

Copy link
Copy Markdown
Contributor

What this fixes

On SQL Server and PostgreSQL, a retried message whose send failed went back to Unresolved but kept its retry claim, so every later retry was accepted and sent nothing. Reverting the retry now also deletes the claim, as RavenDB already does.

  • The EF RevertRetry deletes the message's FailedMessageRetries row in the same transaction as the status change.
  • The error logged when the revert itself fails now names the message.
  • Docs: reviewed docs/bulk-retries-design.md and docs/error-ingestion-design.md. In bulk-retries-design.md, "Other notes" item 1 no longer says the claim is removed only when the message comes back through the error queue.

Guidelines: "Prefer explicit persistence operations" applies and is followed. "Database schema and index changes" does not apply, because no entity or migration changes.

Tests

  • ServiceControl.Persistence.Tests (shared by SQL Server, PostgreSQL and RavenDB): after two messages are forwarded and one of them fails to send, the next retry stages only the one that failed.

@johnsimons
johnsimons merged commit d7a8cef into master Nov 25, 2026
70 checks passed
@johnsimons
johnsimons deleted the warwick/sql-revert-retry-releases-claim branch November 25, 2026 21:25
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.

3 participants