The whole policy, over one record and one event, at one instant. Pure: no
store, no clock, no promises.
Stored
Event
allowRecreate
Decision
nothing
write or delete
either
apply
live at v
older than v
either
stale
live at v
v or newer
either
apply
tombstone at v
older than v
either
deleted
tombstone at v
v or newer
false
deleted
tombstone at v
v or newer
true
apply
tombstone older than tombstoneExpiry
anything
either
apply
An equal version applies, so a sender's retry of an event you already
applied is applied again; that matches Argia's store contract. A tombstone
whose deletedAt is in the future (a clock that went backwards) has a
negative age and holds until the clock passes it again. The expiry edge is inclusive: a tombstone
exactly tombstoneExpiry old still holds.
Throws version-shape-mismatch when the stored version and the event's
have different tuple lengths, except against an expired tombstone, which
counts as nothing stored.
The whole policy, over one record and one event, at one instant. Pure: no store, no clock, no promises.
allowRecreateapplystaleapplydeletedfalsedeletedtrueapplytombstoneExpiryapplyAn equal version applies, so a sender's retry of an event you already applied is applied again; that matches Argia's store contract. A tombstone whose
deletedAtis in the future (a clock that went backwards) has a negative age and holds until the clock passes it again. The expiry edge is inclusive: a tombstone exactlytombstoneExpiryold still holds.Throws
version-shape-mismatchwhen the stored version and the event's have different tuple lengths, except against an expired tombstone, which counts as nothing stored.