Skip to content

Fix EfCoreEnvelopeTransaction batch outgoing envelopes using wrong storage command#2479

Merged
jeremydmiller merged 1 commit intomainfrom
fix/2474-efcore-batch-outgoing-command
Apr 9, 2026
Merged

Fix EfCoreEnvelopeTransaction batch outgoing envelopes using wrong storage command#2479
jeremydmiller merged 1 commit intomainfrom
fix/2474-efcore-batch-outgoing-command

Conversation

@jeremydmiller
Copy link
Copy Markdown
Member

Summary

  • Fixes a bug in EfCoreEnvelopeTransaction.PersistOutgoingAsync(Envelope[]) where the non-Wolverine-enabled DbContext path was calling DatabasePersistence.BuildIncomingStorageCommand instead of BuildOutgoingStorageCommand
  • This caused batch outgoing envelopes to be inserted with incoming table schema/fields rather than the outgoing table
  • The single-envelope PersistOutgoingAsync(Envelope) overload was already correct; only the array overload was affected
  • Adds a regression test that verifies batch outgoing envelopes are written to the outgoing table (not incoming) when using a non-Wolverine-mapped DbContext

Closes #2474

Test plan

  • New integration test persist_batch_outgoing_envelopes_uses_outgoing_table in eager_idempotency_with_non_wolverine_mapped_db_context verifies envelopes appear in AllOutgoingAsync() and not AllIncomingAsync() after the fix
  • Requires SQL Server docker container running (docker compose up -d)

🤖 Generated with Claude Code

… batch outgoing envelopes

PersistOutgoingAsync(Envelope[]) was incorrectly calling
DatabasePersistence.BuildIncomingStorageCommand for the non-Wolverine-enabled
DbContext path, causing outgoing envelopes to be inserted with incoming schema
fields instead of outgoing ones. Fixes #2474.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit c5f0d02 into main Apr 9, 2026
17 of 19 checks passed
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.

Bug: EfCoreEnvelopeTransaction calls BuildIncomingStorageCommand instead of BuildOutgoingStorageCommand for batch outgoing envelopes

1 participant