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

   ### Motivation
   `Replicator.isKnownNode` consults `nodes`, `weaklyUpNodes` and 
`joiningNodes` — but not `exitingNodes` (which it maintains), and nothing 
records a member whose *first* observed event carries `Leaving`, `Down`, 
`PreparingForShutdown` or `ReadyForShutdown` status. Because 
`ClusterEvent.diffMemberEvents` emits exactly one event per member based on its 
current status, a Replicator that starts while a peer is already past `Up` 
never learns about that peer — and then silently discards its 
`Read`/`Write`/`DeltaPropagation` messages (INFO log only), while the peer's 
reads go unanswered. A `Leaving`/`Exiting` member is still a full member 
participating in replication until `Removed`, so this causes non-convergence 
for the affected peer.
   
   ### Modification
   - `isKnownNode`: also consult `exitingNodes` and a new `otherStatusNodes` 
set.
   - `receiveOtherMemberEvent` (handles `MemberLeft`, `MemberDowned`, 
`MemberPreparingForShutdown`, `MemberReadyForShutdown`): record the member's 
`UniqueAddress` in `otherStatusNodes`; pruned in `receiveMemberRemoved`.
   - The original intent of the check — rejecting messages from a *restarted* 
peer reusing the same host:port — is preserved: membership is still tracked by 
`UniqueAddress` (address + uid), and removal still drops the uid.
   - New `ReplicatorKnownNodeSpec`: feeds 
`MemberLeft`/`MemberExited`/`MemberDowned` for a member never seen `Up`, then 
asserts `Internal.Write` from it is accepted (`WriteAck`) instead of discarded.
   
   ### Result
   Members first observed in Leaving/Exiting/Down/shutdown statuses stay known 
until removed; their replication messages are applied instead of silently 
dropped.
   
   ### Tests
   - `sbt "distributed-data / Test / testOnly 
org.apache.pekko.cluster.ddata.ReplicatorKnownNodeSpec"`: 3/3 passed
   - Directional check: reverted the fix, re-ran — all 3 failed as expected
   - Regression: `ReplicatorWildcardSubscriptionSpec`, 
`ReplicatorSettingsSpec`: 7/7 passed
   - Full validation on CI
   
   ### References
   Fixes #3689


-- 
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