Commit 2d19b5b
committed
Backport #8421 to v1.5: flush graceful Disassociate PDUs before transport force-close on shutdown
ActorTransportAdapter.Shutdown() started manager.GracefulStop() and
WrappedTransport.Shutdown() concurrently. The manager's child association actors
(the ProtocolStateActors under AkkaProtocolTransport) write the graceful
Disassociate PDU as part of their own shutdown, so running the wrapped-transport
teardown concurrently let the underlying transport force-close the channel before
that PDU reached the wire. Peers were then left with a zombie association until the
transport failure detector tripped (acceptable-heartbeat-pause, 120s by default);
under the trttl/gremlin test adapters, which swallow the raw TCP close, that lost
PDU is the sole prompt teardown signal.
Sequence the two operations: stop the manager first (bounded by flush-wait-on-
shutdown), then tear down the wrapped transport. The wrapped transport is torn
down whether or not the manager stopped cleanly, so shutdown cannot hang on this
ordering.
(cherry picked from commit a918393)1 parent ea6d0f6 commit 2d19b5b
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
553 | | - | |
554 | | - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
555 | 568 | | |
556 | 569 | | |
557 | 570 | | |
| |||
0 commit comments