Repository navigation
GH-5295 Explicit IDbContextOutbox<T> binds the ancillary store - #5303
Merged
jeremydmiller merged 1 commit intoOct 31, 2026
Merged
Conversation
The DbContextOutbox constructors never bound the ancillary store, so the envelope was persisted through, and an eager flush deleted it from, the main store. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5295
DbContextOutbox<T>(and the non-genericDbContextOutbox, inEnroll) now bind the ancillary store the DbContext is enrolled in, so noOverrideStorageworkaround is needed.The reproduction showed the cause is wider than the delete:
EfCoreEnvelopeTransactionfinds its message database from the context's storage, which was still the main store at construction. The envelope was written through the main store's schema/commands and only coincidentally landed in the right place when both stores shared a schema name; the eager-flush delete then also went to the main store. The test fails before the fix on the first assertion (row not in the ancillary store) and passes after. Covers both the generic and non-generic outbox. Full EfCoreTests: 487/487.🤖 Generated with Claude Code