You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I upgraded to version 7.31.0 and am using UseMandatoryStreamTypeDeclaration=true. When I try to append events to an existing stream a NonExistentStreamException is thrown inside Marten.Events.Operations.QuickAppendEventsOperationBase.PostprocessAsync()
Marten.Exceptions.NonExistentStreamException: Attempt to append to a nonexistent event stream '31b1d9a6-0675-4d6b-b4b4-99d65caab067'
at Marten.Events.Operations.QuickAppendEventsOperationBase.PostprocessAsync(DbDataReader reader, IList`1 exceptions, CancellationToken token)
at Marten.Internal.Sessions.OperationPage.ApplyCallbacksAsync(DbDataReader reader, IList`1 exceptions, CancellationToken token)
at Marten.Internal.Sessions.AutoClosingLifetime.ExecuteBatchPagesAsync(IReadOnlyList`1 pages, List`1 exceptions, CancellationToken token)
at Marten.Internal.Sessions.AutoClosingLifetime.ExecuteBatchPagesAsync(IReadOnlyList`1 pages, List`1 exceptions, CancellationToken token)
at JasperFx.Core.Exceptions.ExceptionTransformExtensions.TransformAndThrow(IEnumerable`1 transforms, Exception ex)
at Marten.Internal.Sessions.AutoClosingLifetime.ExecuteBatchPagesAsync(IReadOnlyList`1 pages, List`1 exceptions, CancellationToken token)
at Marten.Internal.Sessions.AutoClosingLifetime.ExecuteBatchPagesAsync(IReadOnlyList`1 pages, List`1 exceptions, CancellationToken token)
at Marten.Internal.Sessions.AutoClosingLifetime.ExecuteBatchPagesAsync(IReadOnlyList`1 pages, List`1 exceptions, CancellationToken token)
at Polly.ResiliencePipeline.<>c__2`1.<<ExecuteAsync>b__2_0>d.MoveNext()
--- End of stack trace from previous location ---
at Polly.Outcome`1.GetResultOrRethrow()
at Polly.ResiliencePipeline.ExecuteAsync[TState](Func`3 callback, TState state, CancellationToken cancellationToken)
at Marten.Internal.Sessions.DocumentSessionBase.ExecuteBatchAsync(IUpdateBatch batch, CancellationToken token)
at JasperFx.Core.Exceptions.ExceptionTransformExtensions.TransformAndThrow(IEnumerable`1 transforms, Exception ex)
at Marten.Internal.Sessions.DocumentSessionBase.ExecuteBatchAsync(IUpdateBatch batch, CancellationToken token)
at Marten.Internal.Sessions.DocumentSessionBase.ExecuteBatchAsync(IUpdateBatch batch, CancellationToken token)
at Marten.Internal.Sessions.DocumentSessionBase.SaveChangesAsync(CancellationToken token)
at AllInOne.Common.EventStorage.Marten.Infrastructure.Repositories.MartenAggregateRepository.AppendEventToAggregateStreamAsync[TAggregate](EventContainer eventContainer, CancellationToken cancellationToken)
Confirmation that the stream exists with 1 creation event
Append code (I confirmed that the tenant_id is correct).
public async Task AppendEventToAggregateStreamAsync<TAggregate>(
EventContainer eventContainer,
CancellationToken cancellationToken)
where TAggregate : class, IAggregate
{
await using var session = store.LightweightSession(tenantId: eventContainer.Site.ToString());
session.SetMetaData(eventContainer.Trace, eventContainer.Audit);
session.Events.Append(eventContainer.AggregateId, eventContainer.Event);
await session.SaveChangesAsync(cancellationToken).ConfigureAwait(false);
log.LogInformation(
"Stream Id {streamId} - Appended event of type {eventType}",
eventContainer.AggregateId,
eventContainer.Event.GetType().Name);
}
This is the location that the exception is being thrown. Marten.Events.Operations.QuickAppendEventsOperationBase.PostprocessAsync()
The text was updated successfully, but these errors were encountered:
You're from Arcadis? This is the strategy where you're fitting Marten within what had been EventStoreDb usage? I wouldn't recommend your MartenAggregateRepository wrapper in normal usage
Following on from #3482.
I upgraded to version 7.31.0 and am using UseMandatoryStreamTypeDeclaration=true. When I try to append events to an existing stream a NonExistentStreamException is thrown inside Marten.Events.Operations.QuickAppendEventsOperationBase.PostprocessAsync()
Confirmation that the stream exists with 1 creation event
Append code (I confirmed that the tenant_id is correct).
This is the location that the exception is being thrown. Marten.Events.Operations.QuickAppendEventsOperationBase.PostprocessAsync()
The text was updated successfully, but these errors were encountered: