Skip to content

Preserve Cosmos reminder ETags for stale delete checks#10041

Merged
ReubenBond merged 1 commit into
mainfrom
reubenbond/cosmos-reminder-etag-delete
Apr 28, 2026
Merged

Preserve Cosmos reminder ETags for stale delete checks#10041
ReubenBond merged 1 commit into
mainfrom
reubenbond/cosmos-reminder-etag-delete

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Apr 27, 2026

Copy link
Copy Markdown
Member

Split out from #9993.

Why

Cosmos reminder updates should preserve the reminder ETag so existing conditional operations can detect stale writes/deletes correctly. The shared stale-ETag reminder table test also needs to perform a real update before validating stale delete behavior.

What changed

  • Preserve reminder ETags when converting reminder entries to Cosmos entities.
  • Update the shared stale-ETag reminder table test to modify the row before attempting deletion with the old ETag.

CosmosReminderTable.RemoveRow continues to issue a direct conditional delete using ItemRequestOptions.IfMatchEtag; this PR no longer performs a pre-delete read to validate the ETag.

Validation

  • dotnet test test\Extensions\Orleans.Cosmos.Tests\Orleans.Cosmos.Tests.csproj -nologo --filter "FullyQualifiedName~CosmosRemindersTableTests" (compiled; Cosmos precondition skips in local environment)
Microsoft Reviewers: Open in CodeFlow

@ReubenBond ReubenBond force-pushed the reubenbond/cosmos-reminder-etag-delete branch from b31567d to a92766c Compare April 27, 2026 23:41
@ReubenBond ReubenBond changed the title Fix Cosmos reminder stale ETag deletes Preserve Cosmos reminder ETags for stale delete checks Apr 27, 2026
@ReubenBond ReubenBond enabled auto-merge April 28, 2026 00:07
Preserve reminder ETags when converting entries to Cosmos entities and verify the current item ETag before delete. Update the shared stale-ETag test to perform a real row update before validating stale delete behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ReubenBond ReubenBond force-pushed the reubenbond/cosmos-reminder-etag-delete branch from a92766c to f8164e3 Compare April 28, 2026 01:45
@ReubenBond ReubenBond added this pull request to the merge queue Apr 28, 2026
Merged via the queue into main with commit 1589f23 Apr 28, 2026
62 checks passed
@ReubenBond ReubenBond deleted the reubenbond/cosmos-reminder-etag-delete branch April 28, 2026 02:41
@github-actions github-actions Bot locked and limited conversation to collaborators May 28, 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