Skip to content

durable: domain effects of a parent transition an actor drives are never dispatched #257

Done

Description

@reka18

What happens

A parent transition that an actor drives can emit domain effects, such as an email or a charge. durable never dispatches them, live or on Recover:

  • DeliverToActor records its step with no effects.
  • A parent Fire driven by an actor that a Fire, RunService or Tick spawned is journaled as an entry of that step, but only the step's own results' effects go into Record.Effects.
  • On replay, stepEffects doesn't include the effects of re-fired parent Fires either.

So the same transition dispatches its effects when it's reached through Handle.Fire, and silently drops them when an actor drives it. #235 made Tick spawn actors, so a timer can now reach this too.

Reproduction: TestFire_DispatchesTheEffectsOfAParentFireAnActorDrove in durable/actor_fire_effects_test.go, skipped. Its skip message points at #235, which left this out of scope; it should point here.

Possible fix

Fold each journaled parent Fire's effects into its step's dispatch list after the step's own, in the order they fired, live and on replay. Give DeliverToActor the same treatment, so the effect ids are stable across replay.

Relates to: #214, #235

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions