feat: add multi-stream atomic append to IEventWriter#510
Conversation
…tWriter Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… TieredEventStore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review Summary by QodoAdd atomic multi-stream append capability to event store implementations
WalkthroughsDescription• Add NewStreamAppend type and multi-stream AppendEvents overload to IEventWriter • Implement atomic multi-stream append across all event store implementations • Provide default sequential fail-fast fallback for stores without native support • Add extension methods and comprehensive test coverage for multi-stream operations Diagramflowchart LR
A["IEventWriter<br/>Interface"] -->|"adds multi-stream<br/>AppendEvents"| B["NewStreamAppend<br/>Type"]
B -->|"implemented by"| C["Event Store<br/>Implementations"]
C -->|"KurrentDB"| D["Native Atomic<br/>MultiStreamAppendAsync"]
C -->|"SQL Stores"| E["Transaction-based<br/>Atomic Append"]
C -->|"InMemory"| F["Sequential<br/>Append"]
A -->|"default impl"| G["Sequential<br/>Fail-fast"]
H["Store Extensions<br/>WriterExtensions"] -->|"wraps"| A
I["Decorators<br/>Traced/Tiered"] -->|"delegate to"| A
File Changes1. src/Core/src/Eventuous.Persistence/EventStore/IEventWriter.cs
|
Code Review by Qodo
1.
|
Deploying eventuous-main with
|
| Latest commit: |
93eabf7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0e5ca858.eventuous-main.pages.dev |
| Branch Preview URL: | https://feat-multi-stream-append.eventuous-main.pages.dev |
…Context() - Add .NoContext() to IEventWriter default implementation await call - Throw InvalidOperationException for empty Events in NewStreamAppend (can't verify expected version) - Add Ensure.NotNull checks for Events/Changes in WriterExtensions and StoreFunctions - Remove redundant empty-events NoOp handling from all store implementations (KurrentDB, SqlEventStoreBase, SqliteStore, InMemoryEventStore) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
NewStreamAppendtype andAppendEvents(IReadOnlyCollection<NewStreamAppend>, CancellationToken)overload toIEventWriterwith a default sequential fail-fast fallbackMultiStreamAppendAsync(requires KurrentDB 25.1+)SqlEventStoreBaseAppendToStreammethod)TracedEventWriter,TracedEventStore,TieredEventStore) delegate to underlying storeStoreextension overloads forProposedAppend[]and raw event collectionsTest plan
StoreAppendTests— 3 new tests inherited by all stores🤖 Generated with Claude Code