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
docs: state that a reminder is one alarm per actor and name
schedule is keyed by actor and reminder name, so scheduling a name that
is already armed moves that alarm instead of adding another. The
behaviour is deliberate and matches Orleans and Durable Objects. It was
stated nowhere, and it fails silently: an actor arming one reminder per
queued item keeps only the last, and the earlier wake-ups never happen.
A user shipped that to production and found it by hand.
The reminders guide now gives the uniqueness key, shows the pattern that
loses data, and shows the one-alarm-many-items pattern to use instead.
That pattern is executed by a test rather than only read, since a sample
nobody runs is how the next report gets written.
Three tests pin the semantics being documented: a second schedule moves
the alarm, distinct names coexist on one actor, and the same name on
another actor is separate.
A move that changes next_run_at now reports solid_objects.reminder.replaced
carrying actor identity, name, and both times, with no arguments.
Rescheduling to the same time reports nothing. The replacement was
otherwise indistinguishable from a first schedule.
Reminders are keyed by `(actor, reminder name)`, enforced by a unique index on `(instance_id, name)`. `schedule` is therefore an upsert: scheduling a name that is already armed moves that alarm instead of adding another, which is what makes re-arming safe from a handler that may run more than once. An actor needing several pending items should arm one alarm for the earliest and drain everything due when it fires, rather than one alarm per item; the [reminders guide](../README.md#a-reminder-is-one-named-alarm-per-actor) shows that pattern. A move that changes `next_run_at` emits `solid_objects.reminder.replaced`, because the replacement is otherwise indistinguishable from a first schedule.
443
+
442
444
When due, the scheduler locks the source instance and creates a normal mailbox
443
445
row with an idempotency key derived from reminder ID and occurrence. The
444
446
mailbox insert and reminder advancement commit atomically. The mailbox provides
0 commit comments