Variable mapping
This page is part of the documentation for Orleans.Lattice 10.5.0 (release line 10.5), built 2026-12-05. It is also published as markdown, with every table and list, at variable-mapping.md, and llms.txt lists every page.Part of Refinement note: WAL durability lifecycle to production.
| Spec variable | Protocol role | Code counterpart |
|---|---|---|
next |
The partition's offset allocator | The WAL shard's next sequence, advanced by WalOffsetAllocationCore.Assign under the shard's state gate inside WalShardGrain.AppendAsync and reported by WalShardGrain.GetNextSequenceAsync. |
inflight |
Appends assigned an offset whose flush has not landed | The shard's in-flight flush chain (WalShardGrain.StartFlush, WalShardGrain.FlushAsync); the oldest in-flight start is what WalShardGrain.DurableContiguousTailOffset feeds WalShippingWatermark.DurableContiguousTail. |
occ (and durable, the occupied offsets) |
The stored entries, each with its occupant: the write the shard acknowledged there, starting a batch (acked) or continuing the batch before it (ackedMid), or an abandoned call that landed late (late). After a cross-silo move the predecessor's rows are ackedPrev and latePrev; dup is an offset two batches with different starts both hold |
Entries the partition's IWalStorageProvider has durably flushed and the GC has not trimmed. The in-memory and file providers refuse an occupied offset. The Azure Table provider inserts its phase-1 entry rows and phase-2 manifest rows with Add, but keys them by the batch's start offset (AzureTableWalStorageProvider.BuildBatchPartitionKey), so they are create-only per batch start, not per offset: a batch with another start can write an offset inside an existing batch, which dup records (issue #5810). Naming the occupant is enough to see a collision (issue #5799). |
tail |
Oldest readable offset | The provider's oldest retained offset, read by the fall-off checks through ICommitLogReader.GetTailOffsetAsync and ILeafReplayCoordinatorGrain.GetTailOffsetAsync. |
acked |
Writes acknowledged to their writer | Appends whose WalShardGrain.AppendAsync completed, which happens only after their flush landed. |
orphans |
Abandoned appends that may still land | Provider calls WalAbandonedFlushRegistry holds: flushes WalShardGrain stopped waiting for at their deadline or under an expired drain budget, and provider faults whose outcome is unknown until the provider's settle signal completes (issue #6116), never acknowledged (issue #4621). |
hidden |
Abandoned calls the shard's current activation cannot see | A predecessor activation's calls on another silo: WalAbandonedFlushRegistry is process-wide, so a reactivation on the same silo sees them and one on another silo sees none. Only the CrossSilo variant reaches it. |
ct |
The store's TAIL row |
The Azure Table provider's per-shard TAIL row (AzureTableWalStorageProvider.TailRowKey), the committed tail recovery reads (AzureTableWalStorageProvider.GetHighestOffsetAsync) and the TAIL commit fence's condition (issue #5810). Tracked only with WithCrossSiloMove; with one silo it equals the highest stored offset. |
curFresh, prevFresh |
Whether the current activation's provider instance, and its predecessor's on another silo, hold a current view of TAIL |
WalShardCommitFence on each AzureTableWalStorageProvider instance: a held TAIL ETag that still matches the row, under the instance's fence generation. Abstraction: the ETag, the generation and the known flag are one boolean per instance; a refused or failed conditional write (WalShardCommitFence.Invalidate) makes it false and the next TAIL read (WalShardCommitFence.Fill) true again. A held ETag is adopted from a phase-2 replay proof only when the row carries the instance's own commit nonce (AzureTableWalEntity.CommitNonce), so a same-value re-stamp by another instance never makes it true. |
resyncing |
The allocator's pending re-seed | The shard's sticky failure after a flush failure (WalShardGrain.HandleFlushFailureAsync), which refuses appends until its resync, and a new activation's recovery in WalShardGrain.OnActivateAsync, before which it allocates nothing. |
up[l] |
A leaf activation exists | A live BPlusLeafGrain activation whose activation replay has been armed (BPlusLeafGrain.ExecuteActivationReplayAsync). |
cache[l] |
The in-memory projection | BPlusLeafGrain entry cache (LeafEntryCache), rebuilt on every activation from a snapshot and the WAL. Modelled as the set of owned offsets it holds; values are abstracted away. |
replayRequested[l] |
A scheduled bounded replay slice | Activation arms replay; a populated resident leaf's timer or an empty floor-holder's GC drive schedules another slice. Foreground appends do not schedule replay. This abstracts successful timer registration after durable identity seeding, finite stall thresholds and eventual admission. |
rp[l] |
The leaf's read position (pending or persisted) | The pending checkpoint map in BPlusLeafGrain.Projection (_pendingCheckpointOffsetsByPartition) over the persisted slot; max(rp, stCp) is BPlusLeafGrain.GetCurrentCheckpointForPartition. It is a READ position: BPlusLeafGrain.ReplayPartitionAsync advances it over entries it skips as another leaf's work (#2270). |
stCp[l] |
The activation's belief about its persisted checkpoint | LeafNodeState.ProjectionCheckpointOffset / LeafNodeState.ProjectionCheckpointOffsetsByPartition in state.State, read through BPlusLeafGrain.GetPersistedCheckpointForPartition. |
durCp[l] |
What grain storage holds | The checkpoint carried by the last successful WriteStateAsync of the leaf's state. |
anchor[l] |
The checkpoint an activation started from | The value BPlusLeafGrain.TryRehydrateFromSnapshotAsync writes into state.State from the snapshot's coverage without persisting it, or the stored checkpoint on a cold start. Modelling device: it exists so PersistedBeliefHonest can admit that deliberate, unpersisted rehydrate belief and nothing else. |
clk[l] |
The leaf's persisted clock is past Zero | LeafNodeState.Clock; BPlusLeafGrain.ReportCursorIfActiveAsync publishes nothing while it is Zero. The model treats the clock as live when it is persisted past Zero or the projection holds a row. |
cov[l] |
Snapshot coverage the activation has recorded | BPlusLeafGrain.DurableSnapshotCoverageForPartition, raised only by BPlusLeafGrain.RecordDurableSnapshotCoverage from a load or a capture the store kept (#3440). Per activation: lost on stop. |
snapCov[l], snapRows[l] |
The durable snapshot | The blob ILeafSnapshotStorageGrain.SaveAsync keeps: LeafSnapshotBlob.SnapshotOffsetsByPartition and its rows. |
stale[l] |
Leaf latched stale (fail closed) | LeafProjectionStaleException raised by the cold-replay guard in BPlusLeafGrain.ReplayWalSinceCheckpointCoreAsync or by a LatticeFallOffLogDetector.ClassifyAsync loss decision; operator rebuild required. |
hadSnap[l] |
The leaf's durable record that it has held snapshot coverage | LeafNodeState.SnapshotCoveredPartitions (issue #4634): one-way per-partition flags BPlusLeafGrain.RecordDurableSnapshotCoverage raises on a kept capture or a load, written by FlushDurableMaterialiserFrontierCoreAsync in the leaf row before the publish that may rely on them. Grouped with the pin variables because it is written in the same step. Tracked only under SnapshotLoss. |
pinOff[l], pinHlc[l] |
The leaf's durable materialiser pin | The pin store's per-consumer offset and frontier, merged by monotone max in WalMaterialiserPinGrain.Merge. pinHlc = "zero" with no offset is the block pin seeded by BPlusLeafGrain.SeedDurableMaterialiserBlockPinAsync; pinHlc = "gone" is an entry the GC retired (LatticeWalGcScheduler, PinRetire). |
row[l] |
The leaf's state row exists | LeafNodeState in grain storage (issue #4654). A leaf without it serves data, and writes a first row, only when the call carries a create intent naming it (LatticeNewLeafIntentContext.IsFor); the separate row record (ILeafRowRecordGrain) is defence in depth the model does not need, since it closes no case the intent leaves open. Changes only under SnapshotLoss. |
purgeRec[l] |
The leaf's purge marker | LeafRowRecordState.PurgeCleared on the leaf's ILeafRowRecordGrain record (issue #4700, fixed by #4710): written by ILeafRowRecordGrain.MarkPurgeClearedAsync first when a purge reaches the leaf, kept through the clear, and reset by recovery only once the leaf's row is durable again; the shard deletes the marked records once it is purged. Changes only under SnapshotLoss. |
deleted |
The writes a purge deleted | A ghost: the acknowledged writes a leaf owned when the purge marked it. ReadPositionHonest is carved out for exactly these. |
purged |
One purge per behaviour | A ghost bounding the instance: a behaviour takes at most one purge, which may mark both leaves and is charged once to the fault budget. |
cleared[l] |
The purge cleared the leaf's row and recovery has not re-created it | A ghost: no production counterpart. It exists so ClearRecorded can state that the marker outlives the clear until the re-create. |
faults |
Environment fault budget | Modelling device only: the fairness ceiling (faults do not happen for ever). No production counterpart. |