pjfanning commented on code in PR #3676:
URL: https://github.com/apache/pekko/pull/3676#discussion_r4364088990


##########
remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala:
##########
@@ -788,8 +788,12 @@ private[remote] abstract class ArteryTransport(_system: 
ExtendedActorSystem, _pr
       case ShuttingDown               => Future.successful(Done) // silence it
       case exc: UidCollisionException =>
         log.warning(exc.getMessage)
-        // quarantine will not do much since handshake not completed, but for 
good measures
-        quarantine(peer.address, Some(peer.uid), exc.getMessage, harmless = 
false)
+        // Quarantining the peer here would be ignored since the handshake is 
not completed, and the
+        // uid belongs to the existing association. The envelope header only 
carries the origin uid, so
+        // messages from the colliding peer cannot be told apart from the 
existing association.
+        // Tell the colliding peer that it has been quarantined instead. 
Control messages are not held
+        // back by the outbound handshake.
+        sendControl(peer.address, Quarantined(localAddress, peer))

Review Comment:
   Added `log.info("Sending Quarantined to colliding peer [{}]", peer)` before 
the `sendControl` in 43d4e02f51.



##########
remote/src/test/scala/org/apache/pekko/remote/artery/RemoteConnectionSpec.scala:
##########
@@ -97,6 +115,7 @@ class RemoteConnectionSpec extends 
ArteryMultiNodeSpec("pekko.remote.retry-gate-
       // doesn't get through
       localProbe.expectNoMessage()
       expectCollisionWarning(collisionWarnings1)
+      expectQuarantinedBy(remote2Quarantined, localSystem)

Review Comment:
   Done in 43d4e02f51: both collision tests now subscribe a 
`ThisActorSystemQuarantinedEvent` probe on `remoteSystem1` before the collision 
and `expectNoMessage` on it at the end, so the check covers the whole test.



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