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

   ### Motivation
   `OutboundHandshake` grabs an envelope from upstream and holds it in 
`pendingMessage` while it cannot push downstream (e.g. a HandshakeReq just 
consumed the downstream availability). Its `postStop` did not account for the 
held envelope, so if the stage stopped while holding one, the envelope was 
neither pushed, nor returned to the send queue, nor reported — bypassing the 
safeguard in `Association.sendQueuePostStop` that quarantines an association 
stopped with pending system messages. A lost `Watch`/`Unwatch`/`Terminate` 
would tear down the association without quarantine, and the peer may keep 
believing the system message is in flight.
   
   ### Modification
   - `OutboundHandshake.postStop`: if `pendingMessage` is non-empty, send the 
envelope to `deadLetters` and, when it carried a `SystemMessage`, quarantine 
via `outboundContext.quarantine(...)` — mirroring `sendQueuePostStop`.
   - The previously unused `system` constructor parameter is now used 
(`@nowarn` removed); no signature change.
   - `OutboundHandshakeSpec`: two deterministic cases driving the stage into 
the holding state (first push after `InjectHandshakeTick`), then cancelling 
downstream and asserting (a) the envelope reaches dead letters, (b) a pending 
`SystemMessage` triggers quarantine.
   
   ### Result
   No envelope disappears silently when the handshake stage stops; the 
pending-system-message quarantine safeguard can no longer be bypassed through 
this path.
   
   ### Tests
   - `sbt "remote / Test / testOnly 
org.apache.pekko.remote.artery.OutboundHandshakeSpec"`: 9/9 passed
   - Directional check: reverted the fix, re-ran the two new tests — both 
failed as expected
   - Full validation on CI
   
   ### References
   Fixes #3690


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