He-Pin opened a new pull request, #3433:
URL: https://github.com/apache/pekko/pull/3433

   ### Motivation
   When `FilteredPayload` is stored in the journal (e.g. via an `EventAdapter` 
that maps certain events to `FilteredPayload`), replaying those events would 
pass `FilteredPayload` to the user's `eventAdapter.fromJournal` or 
`receiveRecover` handler, which is unexpected and can cause failures.
   
   ### Modification
   - In `ReplayingEvents` (typed persistence), skip `FilteredPayload` by 
returning `EmptyEventSeq` before calling `eventAdapter.fromJournal`.
   - In `Eventsourced` (classic persistence), add a case to ignore 
`FilteredPayload` before it reaches the user's `receiveRecover` handler.
   - Add directional tests for both classic and typed persistence that fail 
before the fix.
   
   ### Result
   `FilteredPayload` entries in the journal are silently skipped during 
recovery. Sequence numbers are still correctly advanced.
   
   ### Tests
   - `sbt "persistence / Test / testOnly 
org.apache.pekko.persistence.PersistentActorSpec"`
   - `sbt "persistence-typed-tests / Test / testOnly 
org.apache.pekko.persistence.typed.scaladsl.EventSourcedBehaviorSpec"`
   
   ### References
   Refs akka/akka-core#32000


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to