Skip to content

Commit

Permalink
TASK: Use ProjectionReplayService::resetAllProjections instead
Browse files Browse the repository at this point in the history
as a relay all will just to that at first, but then there is no event to catch up to.
Reset is more obvious that way.
  • Loading branch information
mhsdesign committed Feb 12, 2024
1 parent ec26697 commit c79e895
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,9 @@ public function migrateLegacyDataCommand(bool $verbose = false, string $config =
$this->quit();
}
$this->connection->executeStatement('TRUNCATE ' . $connection->quoteIdentifier($eventTableName));
// we also need to reset the projections; in order to ensure the system runs deterministically. We
// do this by replaying the just-truncated event stream.
// we also need to reset the projections; in order to ensure the system runs deterministically
$projectionService = $this->contentRepositoryRegistry->buildService($contentRepositoryId, $this->projectionReplayServiceFactory);
$projectionService->replayAllProjections(CatchUpOptions::create());
$projectionService->resetAllProjections();
$this->outputLine('Truncated events');

$liveContentStreamId = ContentStreamId::create();
Expand Down

0 comments on commit c79e895

Please sign in to comment.