He-Pin opened a new pull request, #2814: URL: https://github.com/apache/pekko/pull/2814
## Motivation When processing externally replicated events, the `handleExternalReplicatedEventPersist` method updates `seenPerReplica` without validating that the received sequence number matches the expected next sequence number. This could mask bugs in external replication transport implementations where events arrive out of order or with gaps. This resolves a long-standing FIXME (originally from akka/akka#29259) that was ported along with the external replication transport support. ## Modification Added defensive validation before updating `seenPerReplica`: - Computes expected next sequence number for the origin replica - Logs a warning if the received sequence number does not match (duplicate or gap) - The event is still processed (to maintain backward compatibility), but the warning helps diagnose transport issues ## Result Bugs in external replication transport implementations (missing events, duplicate events, out-of-order delivery) are now detected and logged, making debugging significantly easier. ## References - Resolves FIXME from akka/akka#29259. - Independent pekko evolution — this fix was never implemented in akka. -- 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]
