pjfanning opened a new pull request, #3550:
URL: https://github.com/apache/pekko/pull/3550

   ### Motivation
   Port of akka/akka-core#32117 (backport of akka/akka#32050, issue 
akka/akka#31095). That fix stopped `InboundQuarantineCheck` replying with a 
`Quarantined` control message for later inbound messages from a harmlessly 
quarantined (gracefully shut down) node, which made the remote node down itself 
via `DownSelfQuarantinedByRemote` - notably during a network partition.
   
   Pekko already stops propagating harmless quarantines by default: #1555 added 
`pekko.remote.artery.propagate-harmless-quarantine-events = off`, and 
`QuarantinedTimestamp.harmless` / `newQuarantined(harmless)` already exist, so 
no MiMa filters are needed. What was missing was the multi-jvm coverage of the 
end-to-end cluster scenario.
   
   ### Modification
   - `DowningWhenOtherHasQuarantinedThisActorSystemSpec`: ported the Akka 
rewrite. Quarantines `second` directly via 
`RARP(system).provider.quarantine(...)` instead of relying on split brain 
resolver timing, asserts `second` receives `ThisActorSystemQuarantinedEvent` 
and terminates within 5 s (shorter than `stable-after`, so it is not normal 
downing), adds a `fourth` node and a new case "not be triggered by another node 
shutting down during network partition" - the actual #31095 scenario. Pekko's 
Artery `pending` guard and `ThrottlerTransportAdapter.Direction` usage are kept.
   - `Association` / `InboundQuarantineCheck`: log at info when a `Quarantined` 
control message is sent, and mention "Harmless quarantine." in the harmless 
quarantine log message, matching Akka. Log-only.
   - `TestContext`: pass `harmless = false` explicitly, as in Akka.
   
   ### Result
   Multi-jvm coverage of the `DownSelfQuarantinedByRemote` scenarios, including 
harmless quarantine during a network partition. No behavioural change beyond 
log messages.
   
   ### Tests
   - `sbt "project cluster" "MultiJvm/testOnly 
org.apache.pekko.cluster.DowningWhenOtherHasQuarantinedThisActorSystem"` - 4 
nodes, 4 tests each, all passed
   - `sbt "remote/testOnly 
org.apache.pekko.remote.artery.HarmlessQuarantineSpec 
org.apache.pekko.remote.artery.OutboundIdleShutdownSpec 
org.apache.pekko.remote.artery.RemoteMessageSerializationSpec"` - 14 passed
   - native scalafmt run on the changed files
   - MiMa not run: no signature changes
   
   ### References
   Refs #1555 - port of akka/akka-core#32117 (the `InboundQuarantineCheck` fix 
was already present). Akka source is Apache-2.0 licensed as of 2023-09-20.
   


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