Table of Contents

Enum ProjectionAdvanceOutcome

Namespace
Excalibur.EventSourcing
Assembly
Excalibur.EventSourcing.Abstractions.dll

What a positioned projection write did.

public enum ProjectionAdvanceOutcome

Fields

Applied = 0

The state and its position were written.

Superseded = 1

The stored position was not the one the caller expected, so nothing was written.

Unplaceable = 3

The row carries no position to advance from, so nothing was written and retrying cannot help.

This says what the WRITE did, and deliberately nothing about what the row contains. A positioned write advances from a number and the row has none, so there was nothing to match and nothing was written. Every part of that is true atomically at the instant of the refusal.

It does NOT tell you whether the stored state is a usable fold, and must not be read as doing so. This result carries no state, and the position it was classified against was read at a DIFFERENT instant from the one the write was refused at -- several providers must read the row after the engine rejects the write, and a concurrent writer can change it in between. An outcome that characterised what the row CONTAINS would therefore attribute a property of the row-at-read-time to a write refused earlier, and it could already be false by the time a caller acted on it. That is the unordered-observation defect this whole contract exists to remove, so the outcome does not carry the claim. To learn what the row holds, read its position: ProjectionPositionKind reports that as a measured fact, together with the value, in one observation -- and it distinguishes a complete fold whose coordinate is unknown from a state that is no fold at all.

This is terminal for the writer, and it is NOT a retry. Re-reading yields the same row and the same refusal, so a caller that treats it as Superseded redelivers forever. The repair is RebuildAtPositionAsync(string, TProjection, long, CancellationToken), which writes state and position together and so needs no prior prefix to be conditional on. The writer's job here is to refuse to lie and to say which projection needs rebuilding, never to repair the row itself.

Vanished = 2

The projection key is retired, or a required existing row is absent.

Distinct from Superseded on purpose, and the distinction is load-bearing: the correct responses are opposite. A superseded write is re-read and retried; a vanished projection MUST NOT be recreated, because deletion is how erasure removes personal data and re-folding the event stream would reinstate it.