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: an explicit stopActor during a step or a respawn can leave the actor sets out of step #261
#235 makes durable skip spawning a state's actor when that actor's state was already left in the same step (a parent Fire stopped it, or a later timer in the same Tick stops it), and stops a respawned actor whose state is no longer active after Recover. Two gaps remain, both involving an explicit stopActor while the declaring state stays active:
A skipped spawn isn't noted as attempted. A Fire enters state Y, which declares actor kitchen; an entry action, or a parent Fire an actor drives, then runs stopActor("kitchen") while Y stays active. The spawn is skipped and never marked attempted, so the actor sets record kitchen as unstarted, and a later Recover spawns it fresh and runs its behavior, where the live Handle has no such actor. On main the spawn ran and stopped, and it was counted as ended.
A stop that arrives before its target respawns has no effect.Recover respawns running actors A and C in one batch. A's respawn fails and its onError runs stopActor on C before C is running, so the stop does nothing and C respawns. C's state is still active, so the post-respawn pass keeps it, while the journal holds the stop.
Possible fix
Mark a skipped spawn as attempted and ended when the skip comes from an explicit stop (not from leaving the state), and apply the stops noted during a batch respawn to the actors it respawned.
Activity
fix(durable): record an actor stopped in the step that spawns it, or …