Expand description
Error kinds passed to Metrics::on_persistence_error for
persistence_operation::EVENT_APPEND.
§Why an append that raised nothing is reported here
An append is INSERT ... ON CONFLICT (task_id, seq) DO NOTHING, because
seq is a position: writing one twice must leave one row. That is the
safety property, and it is also a way to lose an event without an error.
Two replicas each running their own in-process event queue number one
task’s events from the same place — nothing here hands out a
database-backed lease — so replica B’s event n lands on the position
replica A already wrote, and the row that stays is A’s. Until these labels
existed the store returned Ok(()) and nothing anywhere said so.
The first two kinds mean an event the agent emitted is not in the log,
which is what Metrics::on_persistence_error is for; the third,
HOLD_CEILING, that a stream lost its
copy of one the log held. A retried append of the
same event is not reported here: see
POSITION_CONFLICT.
Constants§
- HOLD_
CEILING - The append succeeded, and the log, at its held-events ceiling, dropped its oldest event though an attached stream still owed it.
- POSITION_
CONFLICT - The position was already held, and the store could not establish that the row already there is this same event.
- TASK_
ABSENT - The store held no such task, so there was nowhere to put the event.