Skip to content

Commit

Permalink
Latching side effects *if* a projection is running in rebuild mode an…
Browse files Browse the repository at this point in the history
…d you hit a "delete" event
  • Loading branch information
jeremydmiller committed Nov 25, 2024
1 parent 1eee5a2 commit a8585ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Marten/Events/Aggregation/AggregationRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ public async ValueTask ApplyChangesAsync(DocumentSessionBase session,
{
var operation = Storage.DeleteForId(slice.Id, slice.Tenant.TenantId);

await processPossibleSideEffects(session, slice).ConfigureAwait(false);
if (session is ProjectionDocumentSession { Mode: ShardExecutionMode.Continuous })
{
await processPossibleSideEffects(session, slice).ConfigureAwait(false);
}

session.QueueOperation(operation);
return;
Expand Down

0 comments on commit a8585ca

Please sign in to comment.