Skip to content

Commit

Permalink
Fix unintentional reset of sequence number during catch up
Browse files Browse the repository at this point in the history
If no new events were applied it could happen that the highest applied sequence number was reset to 0.
  • Loading branch information
robertlemke committed Jul 7, 2023
1 parent b3f18bb commit d972abb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/EventListener/EventListenerInvoker.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ public function catchUp(): void
}
}

$appliedEventsStorage->saveHighestAppliedSequenceNumber($sequenceNumber);
if ($sequenceNumber > 0) {
$appliedEventsStorage->saveHighestAppliedSequenceNumber($sequenceNumber);
}
$appliedEventsStorage->releaseHighestAppliedSequenceNumber();

if ($this->eventListener instanceof AfterCatchUpInterface) {
Expand Down

0 comments on commit d972abb

Please sign in to comment.