ReplayFilter
in package
Read onlyYes
FinalYes
Detects interleaved writers during event replay (recovery).
All modes operate on the in-memory list of events being replayed for a single
recovery — none of them mutate the event store. In particular RepairByDiscardOld
does NOT delete or "repair" anything on disk: it merely excludes older-writer
events from the state rebuilt during this replay. The conflicting events remain
persisted and are re-read (and re-filtered) on every subsequent recovery.
Tags
Table of Contents
Methods
- fail() : self
- filter() : array<int, EventEnvelope>
- mode() : ReplayFilterMode
- off() : self
- repairByDiscardOld() : self
- Recover using only the latest writer's events for this replay; older-writer events are excluded from the rebuilt state but left untouched in the store (the name's "repair" is a recovery convenience, not a durable fix). Use only in migrations where the older writer is confirmed gone.
- warn() : self
Methods
fail()
public
static fail() : self
Return values
selffilter()
public
filter(PersistenceId $persistenceId, iterable<string|int, EventEnvelope> $events, LoggerInterface $logger) : array<int, EventEnvelope>
Parameters
- $persistenceId : PersistenceId
- $events : iterable<string|int, EventEnvelope>
- $logger : LoggerInterface
Return values
array<int, EventEnvelope>mode()
public
mode() : ReplayFilterMode
Return values
ReplayFilterModeoff()
public
static off() : self
Return values
selfrepairByDiscardOld()
Recover using only the latest writer's events for this replay; older-writer events are excluded from the rebuilt state but left untouched in the store (the name's "repair" is a recovery convenience, not a durable fix). Use only in migrations where the older writer is confirmed gone.
public
static repairByDiscardOld() : self
Return values
selfwarn()
public
static warn() : self