From 561ed2c3bb6feda8a1a74c266890fd76fdbbf051 Mon Sep 17 00:00:00 2001 From: mynkow Date: Mon, 21 Nov 2022 13:17:30 +0200 Subject: [PATCH] fix: Reduces the page size when rebuilding a projection --- .../Projections/Rebuilding/RebuildProjection_Job.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Elders.Cronus/Projections/Rebuilding/RebuildProjection_Job.cs b/src/Elders.Cronus/Projections/Rebuilding/RebuildProjection_Job.cs index 157bd094..ebafcb56 100644 --- a/src/Elders.Cronus/Projections/Rebuilding/RebuildProjection_Job.cs +++ b/src/Elders.Cronus/Projections/Rebuilding/RebuildProjection_Job.cs @@ -107,7 +107,7 @@ private async Task RebuildEventsAsync(string eventTypeId, IClusterOperatio RebuildProjection_JobData.EventPaging paging = Data.EventTypePaging.Where(et => et.Type.Equals(eventTypeId, StringComparison.OrdinalIgnoreCase)).FirstOrDefault(); string paginationToken = paging?.PaginationToken; - LoadIndexRecordsResult indexRecordsResult = await eventToAggregateIndex.EnumerateRecordsAsync(eventTypeId, paginationToken).ConfigureAwait(false); // TODO: Think about cassandra exception here. Such exceptions MUST be handled in the concrete impl of the IndexStore + LoadIndexRecordsResult indexRecordsResult = await eventToAggregateIndex.EnumerateRecordsAsync(eventTypeId, paginationToken, 1000).ConfigureAwait(false); // TODO: Think about cassandra exception here. Such exceptions MUST be handled in the concrete impl of the IndexStore IEnumerable eventStreams = await rebuildingRepository.LoadEventsAsync(indexRecordsResult.Records, Data.Version).ConfigureAwait(false); await rebuildingRepository.SaveAggregateCommitsAsync(eventStreams, eventTypeId, Data).ConfigureAwait(false);