He-Pin opened a new pull request, #3706:
URL: https://github.com/apache/pekko/pull/3706
### Motivation
`ThrottlerManager` (the `trttl`/`gremlin` test adapters) declares no
`supervisorStrategy` and never watches its `ThrottledAssociation` children.
Under the default strategy a failed child restarts into
`WaitExposedHandle`/`WaitModeAndUpstreamListener`, but `Handle` is only sent
once — the restarted instance silently drops payloads forever. Terminated
children also remain in `handleTable`, so later `SetThrottle` calls iterate
dead refs and `askModeWithDeathCompletion` replies `SetThrottleAck` while
having no effect. The failure mode is that a multi-node test's fault injection
silently stops working instead of failing loudly.
### Modification
- `ThrottlerManager`: declare `OneForOneStrategy { case NonFatal(_) => Stop
}`, matching `PekkoProtocolTransport`. Stopping is safe and visible:
`ThrottledAssociation.postStop` disassociates the original handle.
- Watch each `ThrottledAssociation` in `wrapHandle` and prune its
`handleTable` entry on `Terminated`.
- New `ThrottlerManagerSpec`: drives a real outbound association through the
manager, completes the wrapped handle's `readHandlerPromise` with a throwing
listener, sends a payload to fail the FSM, and asserts the child is stopped
(not restarted), the original handle disassociated exactly once, and
`ForceDisassociate` afterwards does not touch the pruned entry.
### Result
A broken throttled association is torn down visibly instead of silently
dropping payloads; dead handles no longer linger in the handle table.
### Tests
- `sbt "remote / Test / testOnly
org.apache.pekko.remote.transport.ThrottlerManagerSpec"`: passed
- Directional check: reverted the fix, re-ran — failed as expected (child
restarted, never terminated)
- Regression: `ThrottlerTransportAdapterSpec`, `ThrottlerHandleSpec`: 8/8
passed
- Full validation on CI
### References
Fixes #3688
--
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]