You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
durable: Recover respawns running actors in configuration order, not live spawn order #246
Recover respawns the actors that were running in the order the configuration declares them. Live, they may have spawned in a different order, for example across parallel regions entered at different steps. A message one actor sent live to an actor that didn't exist yet was dropped. On Recover the receiver may already be running, so it now gets that message.
AbsorbRespawn keeps such a message's effects from the parent in most cases. A test pins this: TestRecover_DropsAPongLiveNeverSent. One case gets through: if the late message makes a respawned actor finish or fail, its onDone or onError reaches the parent, because a respawned actor's own settle is treated as new. Live, that Fire never happened.
Example: a pinger and a relay run in parallel regions. Live, the pinger starts first and pings the relay before the relay exists, so the ping is dropped. On Recover, the relay respawns first, receives the ping and finishes. Live notes [], recovered notes [done].
Possible fixes
Journal the live spawn order (or a spawn sequence number per actor), and respawn in it.
Or track which message caused a settle, and keep a settle quiet when its cause was part of the quiet respawn.
Context: found while fixing #234. Before #234, every start message reached the parent again on Recover, so this class was broader.
Activity