rem #19780: Skip acks during connection handoff
* The problem: ACK that was targeted to an old incarnation
was sent to the new, restarted, system with same host:port, and
therefore resulting issues noticed as
"Error encountered while processing system message acknowledgement buffer: [-1 {}] ack: ACK[0, {}]"
when restarting actor system
* The reason:
1. The endpoint reader was about to send OutgoingAck to parent reader,
targeted to the old system.
2. At the same time there is an incoming connection from new system
that triggered TakeOver in the endpoint writer, i.e. replacing
the handle to the connection of the new system.
3. The OutgoingAck is received by the writer, which happily sends it
to the new handle, the new system.
* The solution: Ignore OutgoingAck during the handoff (TakeOver) process.
This commit is contained in:
parent
ed6acd63ec
commit
96b68f6437
2 changed files with 47 additions and 14 deletions
|
|
@ -809,6 +809,12 @@ private[remote] class EndpointWriter(
|
|||
|
||||
case s: Send ⇒
|
||||
enqueueInBuffer(s)
|
||||
|
||||
case OutboundAck(_) ⇒
|
||||
// Ignore outgoing acks during take over, since we might have
|
||||
// replaced the handle with a connection to a new, restarted, system
|
||||
// and the ack might be targeted to the old incarnation.
|
||||
// See issue #19780
|
||||
}
|
||||
|
||||
override def unhandled(message: Any): Unit = message match {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue