fredfp commented on PR #1555:
URL: https://github.com/apache/pekko/pull/1555#issuecomment-2470019872

   > we may need to modify the test harmless=true test to send a message from 
one cluster member to the other to cause the shutdown issue
   
   Without an active SBR, no node will be shutdown: it is the SBR that downs 
itself when receiving `ThisActorSystemQuarantinedEvent`. Without a cluster 
setup in the test (and as such without SBR running), we need to watch the 
`ThisActorSystemQuarantinedEvent` event instead, which is what I did to check 
the bug exists (test passes if the bug exists):
   ```scala
   "eliminate quarantined association when not used (harmless=true)" in 
withAssociation {
     (remoteSystem, remoteAddress, _, localArtery, localProbe) =>
       remoteSystem.eventStream.subscribe(testActor, 
classOf[ThisActorSystemQuarantinedEvent]) // event to watch out for, indicator 
of the issue
   
       val remoteEcho = 
remoteSystem.actorSelection("/user/echo").resolveOne(remainingOrDefault).futureValue
   
       val localAddress = RARP(system).provider.getDefaultAddress
   
       val localEchoRef = 
remoteSystem.actorSelection(RootActorPath(localAddress) / 
localProbe.ref.path.elements).resolveOne(remainingOrDefault).futureValue
       remoteEcho.tell("ping", localEchoRef)
       localProbe.expectMsg("ping")
   
       val association = localArtery.association(remoteAddress)
       val remoteUid = futureUniqueRemoteAddress(association).futureValue.uid
       localArtery.quarantine(remoteAddress, Some(remoteUid), "HarmlessTest", 
harmless = true)
       association.associationState.isQuarantined(remoteUid) shouldBe true
   
       eventually {
         remoteEcho.tell("ping", localEchoRef) // trigger sending message from 
remote to local, which will trigger local to wrongfully notify remote that it 
is quarantined
         expectMsgType[ThisActorSystemQuarantinedEvent] // this is what remote 
emits when it learns it is quarantined by local. This is not correct and is 
what (with SBR enabled) triggers killing the node.
       }
   }
   ```


-- 
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: notifications-unsubscr...@pekko.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to