Skip to content

Commit

Permalink
Fix concurrency query
Browse files Browse the repository at this point in the history
  • Loading branch information
inxilpro committed Nov 17, 2023
1 parent 0e3aa2e commit b59ade7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Lifecycle/EventStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ protected function guardAgainstConcurrentWrites(array $events): void
)),
]);

$query->orderBy('id');
$query->groupBy('state_type', 'state_id');
$query->orderBy('state_id');

$query->where(function (BaseBuilder $query) use ($events, $max_event_ids) {
foreach ($events as $event) {
Expand Down

0 comments on commit b59ade7

Please sign in to comment.