Skip to content

fix(storage): accept deleted streams for check-only writes#240

Open
yordis wants to merge 1 commit intomasterfrom
yordis/fix-deleted-stream-check-commit
Open

fix(storage): accept deleted streams for check-only writes#240
yordis wants to merge 1 commit intomasterfrom
yordis/fix-deleted-stream-check-commit

Conversation

@yordis
Copy link
Copy Markdown
Member

@yordis yordis commented May 8, 2026

  • Prevent check-only write validation from rejecting streams that already satisfy the deleted-stream expectation.
  • Keep consistency checks aligned with deleted-stream state instead of forcing operators through misleading version failures.

@cursor
Copy link
Copy Markdown

cursor Bot commented May 8, 2026

PR Summary

Medium Risk
Adjusts core IndexWriter.CheckCommit decision logic for deleted streams, which can affect write validation outcomes and idempotency behavior. Scope is small and covered by new tests, but it touches storage commit checks.

Overview
Allows check-only writes (empty eventIds) against streams already in a deleted state to return CommitDecision.Ok when the expectedVersion is Any, NoStream, or DeletedStream, instead of rejecting with Deleted.

Adds a regression test covering both hard-deleted and soft-deleted streams when validating ExpectedVersion.NoStream, and includes minor formatting-only cleanups in IndexWriter.cs.

Reviewed by Cursor Bugbot for commit 5ba5c26. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Warning

Rate limit exceeded

@yordis has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 59 minutes and 18 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c89553fa-c33d-4949-864c-92a690e2f0c1

📥 Commits

Reviewing files that changed from the base of the PR and between b093a01 and 5ba5c26.

📒 Files selected for processing (2)
  • src/EventStore.Core.Tests/Services/Storage/CheckCommit/when_checking_deleted_stream_with_expected_version_no_stream.cs
  • src/EventStore.Core/Services/Storage/ReaderIndex/IndexWriter.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yordis/fix-deleted-stream-check-commit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis yordis force-pushed the yordis/fix-deleted-stream-check-commit branch from 76eb9dd to 5ba5c26 Compare May 9, 2026 00:44
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