Action 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 action-mapping.md, and llms.txt lists every page.Part of Refinement note: the live-advance core to production.
| Spec action | Protocol step | Code counterpart | Detector |
|---|---|---|---|
Create |
Environment (B's BulkHintBound). A bulk-born leaf's first activation under the switch's open marker, at any read position, holding every record at or below it |
ShardRootGrain.BeginBulkSwitchAsync takes the hint (ShardRootGrain.CaptureBulkBirthHeadsAsync) with the open marker. The leaf is initialised without SiblingInitialization.WalHeadsAtBirth and seeds no birth pin; its read position arrives after the relocation, through ShardRootGrain.FinishBulkSwitchAsync calling BPlusLeafGrain.SetCheckpointOffsetHintsAsync. |
Yes: LiveCheckpointAdvanceIntegrationTests.A_bulk_appended_leaf_arms_once_its_switch_has_closed and BulkAppendExistingRowsIntegrationTests.BulkAppend_appended_leaves_start_from_the_birth_hint_and_the_runs_switches_close_by_fence. |
Claim(a) |
Environment (E's ClaimHeadCoversPriorAppends, RaisedEpochUnique). A claim is raised: the activation becomes current, its claim head is the allocator head, and the one it supersedes never allocates stamped again |
E's three-step claim (AppendEpochRefinement.md); the core reads its outcome through LeafAppendEpochFence.TryGetArmingView, which answers only for a claim under the current epoch of an activation not stale. Over-approximation: each activation claims once, and any running activation not stale may claim in any order. A deferred pre-link sibling - its marker carrying the donor's pending close or an open split token - never claims or arms (#5851 D1): LatchAdmitsClaim. |
Yes: LiveCheckpointAdvanceIntegrationTests.A_stale_duplicates_append_before_the_claim_is_read_before_the_leaf_advances_past_it, WalShardGrainTests.The_claim_head_is_the_allocator_next_offset and LeafAppendEpochFenceTests.DeferredSiblingClaims. |
OwnAlloc(a) |
Environment (E's StaleEpochNeverAppends). The current activation's stamped append is allocated, and its response reports the unstamped watermark |
WalFencedAppendDispatch.AppendPointAsync and WalFencedAppendDispatch.AppendBatchAsync pass the watermark in each stamped response to LeafAppendEpochFence.OnStampedAppended. |
Yes: LeafAppendEpochFenceTests.Stamped_responses_raise_the_reported_watermark, WalShardGrainTests.Unstamped_appends_are_always_admitted_and_reported and BPlusLeafGrainTests.A_reported_unstamped_append_holds_the_advance_until_a_replay_reads_past_it. |
OwnAllocUnstamped(a) |
An own append made unstamped - a closed gate view, a claim fault or exhausted rounds, an unreachable leaf - by any running activation, always admitted, raising the watermark and reporting itself | WalFencedAppendDispatch.AppendPointAsync and WalFencedAppendDispatch.AppendBatchAsync call LeafAppendEpochFence.OnUnstampedAppended with the offsets an unstamped append returned. |
Yes: LeafAppendEpochFenceTests.Own_unstamped_appends_report_themselves, BPlusLeafGrainTests.A_write_through_an_existing_leaf_method_reports_itself_and_holds_the_advance and BPlusLeafGrainTests.A_descent_unreachable_leaf_never_claims_and_appends_unstamped_and_reported. |
PreArmAlloc(a) |
An append of an activation that has not armed, under the PreArm class: no entry check and no row, admitted on its routing generation, raising only L's leaf-scoped tracking, and its response reporting the shared watermark |
WalShardGrain.AdmitStampLocked (the PreArm branch to WalShardGrain.AdmitGenerationLocked); the tracking is WalShardGrain.NoteLeafAuthorLocked, run in the allocation step. Over-approximation (#5851 D1-D4): an unlinked L pre-arms in every latch state. Production's deferred sibling (a pending donor close or an open split token on its marker, the pre-arm gate, no orphan repair) stamps a routed write PreArm; a latched or repaired one, or one under the eager gate, appends unstamped, which reports itself to every reader. |
Yes: WalShardGrainTests.A_pre_arm_append_is_admitted_with_no_entry_and_writes_no_fence_row, WalShardGrainTests.A_routed_pre_arm_append_never_raises_the_shared_watermark_and_an_unrouted_one_does and LeafAppendEpochFenceTests.DeferredSiblingClaims. |
Resolve(a) |
An armed activation whose marker gained a deferred close head re-arms: it re-claims the deferred generation, or takes the loaded one when a later raise is already re-claimed (C5), and records the allocator head as a close head. ResolveDeferred's head - the carried stale high plus one under the claimless advance (sHi + 1), the allocator head otherwise - maps to production's re-claim head, which the arm's re-claim returns in the same partition turn that records the witness generation and writes with the resolved bit (#5866 G4, A1-A3). The arm may be taken lazily, only when the carried close is the binding hold or after an idle bound (A4): C makes no claim or resolve fair under the claimless advance, so a late or absent arm is already checked; but the carry ends only with the arm's re-claim (ReadPositionHonestResolveClearsWithoutReclaim: the carry ended without the re-claim is red) |
WalShardGrain.ResolveDeferredGenerationAsync from WalShardGrain.ArmAppendEpochAsync, then HandOffMarkerCore.ResolveDeferred. The same arm ends a witnessed donor close's carriage at that partition alone (a5e2e2ef's G4, A1-A6 on #5866): it re-claims the close's AdmittedShard at a generation at or above the witness (HandOffMarkerCore.TryGetCarriedWitness), and one marker write max-raises the close's head there to the head that re-claim returned and sets its resolved bit (HandOffMarkerCore.ResolveCarried, HandOffClose.CarryResolvedAt). A re-claim below the witness, or a witness from another shard root (HandOffClose.LinkedShard), resolves nothing; a failed write leaves the partition carried. The coverage-lag tick's backstop arms a witnessed carried partition only while the carry is binding - an own applied append above the checkpoint that the tick's advance did not pass, held by a reported bound that covers the carried close and lies above the checkpoint - judged on the backstop's own fresh read (LA2); a non-binding carry is deferred, never ended (LA1), once per (partition, witness) and again after a failed attempt (BPlusLeafGrain.TryBackstopCarriedClosesAsync). A split whose activation has not yet read its view reads it before taking its first cut reader, so the reader carries the closes its marker carries, and a mismatched cut is still capped (LA4; BPlusLeafGrain.CaptureSplitCutAsync). |
Yes: WalShardGrainTests.An_arm_resolves_a_deferred_generation_so_a_write_admitted_before_it_is_refused, WalShardGrainTests.An_arm_resolving_a_deferred_generation_below_a_loaded_one_takes_the_current_head, HandOffMarkerCoreCarryTests.An_arm_at_the_witness_raises_that_partitions_head_and_resolves_it_alone, LeafAppendEpochFenceTests.A_carried_close_resolved_at_one_partition_is_dropped_from_its_stamps_only, HandOffMarkerCoreCarryTests.A_re_claim_below_the_witness_resolves_nothing, HandOffMarkerCoreCarryTests.A_witness_from_another_shard_root_stays_carried_and_asks_for_no_arm, BPlusLeafGrainTests.The_backstop_arms_a_binding_carried_partition_once_and_resolves_it_with_the_re_claim_head, BPlusLeafGrainTests.LazyCarry_a_non_binding_carried_close_is_never_armed_and_stays_carried_until_a_raised_stale_high_binds_it, BPlusLeafGrainTests.LazyCarry_a_hold_by_a_report_not_yet_covering_the_close_does_not_bind_it, BPlusLeafGrainTests.LazyCarry_a_non_binding_sibling_reads_nothing_on_the_tick, BPlusLeafGrainTests.LazyCarry_binding_is_judged_on_the_read_that_would_trigger_the_re_claim, BPlusLeafGrainTests.LazyCarry_an_unarmed_siblings_split_claims_nothing_at_its_duplicate_fence, BPlusLeafGrainTests.CarryingReader_a_siblings_first_split_takes_a_reader_carrying_its_closes_and_uplifts, BPlusLeafGrainTests.CarryingReader_a_close_recorded_after_the_reader_still_caps_the_cut, BPlusLeafGrainTests.A_failed_resolve_write_leaves_the_partition_carried_and_the_backstop_arms_it_again and BPlusLeafGrainTests.A_close_witnessed_by_another_shard_root_stays_carried_and_the_backstop_does_not_loop_on_it. |
Land(o) |
The append becomes durable; an own append is applied, recorded by the tracker and acknowledged | The append site applies, then BPlusLeafGrain.MarkLiveAppendApplied releases the count and records the offset in BPlusLeafGrain._liveOwnHigh; an apply that throws leaves the count held, which turns the advance off for the activation. |
Yes: BPlusLeafGrainTests.A_live_advance_waits_until_every_issued_append_is_applied and BPlusLeafGrainTests.A_failed_append_turns_the_live_advance_off_for_the_activation. |
ForeignOpen |
Environment (H). A hand-off opens L's marker before its first admission. Its only mutation is a TypeOK bound (TypeOkForeignWindowPastBound): opening only enables ForeignAlloc, whose role ReadPositionHonestAssumeForeignAfterClose covers |
HandOffMarkerCore.Open, on the leaf's marker or the shard's (ShardRootGrain.OpenHandOffMarkerAsync). |
Yes: HandOffMarkerCoreTests.An_open_is_idempotent_and_holds_only_overlapping_owners and BPlusLeafGrainTests.An_open_leaf_marker_holds_the_advance. |
ForeignAlloc |
Environment (H's HandOffBound). A foreign append is allocated while L's marker is open, or while it is not initialised, where HandOffBound constrains nothing |
A hand-off initiator's stamped append, admitted at the WAL shard under its epoch or routing generation (WalShardGrain.AppendStampedAsync). |
Yes: BPlusLeafGrainTests.An_open_shard_marker_token_holds_only_the_leaves_it_overlaps and LeafHandOffFenceIntegrationTests.Every_split_opens_its_marker_at_the_siblings_birth_and_closes_it_by_the_modes_fence. |
Close |
Environment (H's HandOffBound and CloseHeadMonotone). The close fences and records a head, above every foreign record once the marker is initialised, max-merged into closedAt |
HandOffMarkerCore.Close with the heads the initiator's re-claim returned (ShardRootGrain.CloseHandOffMarkerAsync); HandOffMarkerCore.RequiredHead takes the maximum over every retained close and the compacted heads. |
Yes: HandOffMarkerCoreTests.A_close_records_the_fence_heads_over_the_hand_off_range_and_never_reopens, HandOffMarkerCoreTests.A_later_close_with_lower_heads_never_lowers_the_required_heads and BPlusLeafGrainTests.A_close_head_above_the_checkpoint_holds_the_advance_until_a_replay_reaches_it. |
HandOff(o, a) |
Environment. A foreign record is delivered to an activation, which acknowledges it; it may never happen | The relocation of a hand-off's rows into the owner (a split's transfer, a reclaim's absorb, a bulk graft), which the core sees only as rows already in its projection. Over-approximation: any running activation may receive any durable foreign record, at any time. | Yes: LeafHandOffFenceIntegrationTests.Every_split_opens_its_marker_at_the_siblings_birth_and_closes_it_by_the_modes_fence and LeafHandOffFenceIntegrationTests.Every_reclaim_opens_its_marker_on_the_survivor_and_closes_it_after_retiring_the_absorbed_leaf. |
OldAlloc |
A 10.2.0 silo's unstamped append (or any path the census classes unstamped), always admitted, raising the unstamped watermark | WalShardGrain.AppendAsync, whose unstamped shapes have no rejection path (the fence never rejects one), raising WalShardGrain._unstampedWatermark. |
Yes: WalShardGrainTests.Unstamped_appends_are_always_admitted_and_reported, WalAppendFenceMixedVersionTests.The_existing_unstamped_methods_keep_working_on_the_older_build and LiveCheckpointAdvanceIntegrationTests.A_foreign_unstamped_append_reported_after_arming_is_read_by_replay. |
Replay(a) |
Read and apply the next durable entry, never a trimmed one. It is also every catch-up (#5851 ruling 2 and its widening, a5e2e2ef's #5851 comment 6668868649): a replay to max(reported bound, close head - 1), whatever the target, read one contiguous durable entry at a time (W1); the next split's cut re-reads every cap in its own turn (W2, SplitHeads), and only the arm's re-claim resolves a deferred close (W3). Red: ReadPositionHonestCatchUpCheckpointPastRead, SiblingHintHonestCatchUpPassesCarriedStaleHigh and ReadPositionHonestCatchUpTargetsDeferredHead |
BPlusLeafGrain.ReplayPartitionAsync, the replay-based advance the core falls back to (WalDurability's ReadStep). A pre-arm leaf whose claimless advance or split hint is held only by a reported bound (LeafLiveAdvanceCore.CatchUpBound) is owed this replay once per bound value, dispatched by the coverage-lag tick through the starvation drive and never on a write, and re-armed when that drive does not run its replay (BPlusLeafGrain.TakeReportedBoundCatchUp; #5851, ruling 2 and N1). |
Yes: BPlusLeafGrainTests.A_catch_up_drive_refused_admission_is_owed_again, BPlusLeafGrainTests.A_leaf_that_has_not_read_to_its_claim_head_advances_only_by_replay, LiveCheckpointAdvanceIntegrationTests.A_foreign_unstamped_append_reported_after_arming_is_read_by_replay, BPlusLeafGrainTests.A_reported_bound_hold_is_read_past_on_the_next_tick_once, BPlusLeafGrainTests.A_reported_bound_hold_reads_nothing_on_the_write_path, BPlusLeafGrainTests.A_split_capped_only_by_its_reported_bound_owes_the_donor_a_catch_up, BPlusLeafGrainTests.A_split_capped_by_a_close_head_and_the_watermark_owes_no_catch_up, LeafLiveAdvanceCoreTests.The_catch_up_bound_is_owed_exactly_when_only_the_reported_bound_holds_the_free_advance, BPlusLeafGrainTests.CloseHeadCatchUp_whose_read_stops_at_a_hole_advances_only_to_the_contiguous_position (W1), BPlusLeafGrainTests.CloseHeadCatchUp_a_split_target_covers_every_carried_stale_high and BPlusLeafGrainTests.CloseHeadCatchUp_a_stale_high_risen_after_the_catch_up_caps_the_next_cut (W2) and BPlusLeafGrainTests.CloseHeadCatchUp_a_close_deferred_at_every_partition_is_never_a_target (W3). |
LiveAdvance(a) |
An armed activation advances its read position to its highest own applied offset without reading | BPlusLeafGrain.TryAdvanceLiveCheckpointAsync, deciding with LeafLiveAdvanceCore.TargetFor, whose arming is Armed(a) conjunct for conjunct: claimRaised and claimHead from LeafAppendEpochFence.TryGetArmingView, handOffClear (mInit and ~hoOpen) and closeHead from BPlusLeafGrain.ReadLiveAdvanceHandOffAsync, unstampedSeen, and the tracker through LeafLiveAdvanceCore.IsQuiescent. Production holds the advance in more cases than Armed(a) (see the gaps). |
Yes: LeafLiveAdvanceCoreTests.The_advance_is_taken_exactly_when_the_leaf_is_armed, LeafLiveAdvanceCoreTests.An_armed_leaf_advances_to_its_highest_own_offset, BPlusLeafGrainTests.A_live_written_leaf_of_a_new_tree_advances_its_checkpoint_without_a_replay and BPlusLeafGrainTests.Each_partition_advances_to_its_own_highest_offset. |
Capture(a) |
The shared per-leaf snapshot keeps the highest coverage | BPlusLeafGrain.CaptureSnapshotCoreAsync, after the coverage-lag tick banks a live advance (BPlusLeafGrain.OnCoverageLagTimerTickAsync); the store never lowers coverage (LeafSnapshotStorageGrain.MergeMonotone). |
Yes: LiveCheckpointAdvanceIntegrationTests.A_live_written_leaf_banks_its_snapshot_without_a_replay_drive, BPlusLeafGrainTests.The_coverage_lag_tick_makes_a_live_written_leafs_pin_usable_without_a_replay and LeafSnapshotStorageGrainTests.SaveAsync_still_merges_a_regressing_capture_that_carries_every_stored_key. |
GcTrim |
Trim the next durable entry below the snapshot's coverage | LatticeWalGc.TrimShardAsync, bounded by the leaf's pin (WalDurability's GcTrim). Over-approximation: the model trims to the shared snapshot's coverage alone. |
Yes: LeafDurablePinCoreTests.A_covered_partition_is_entitled_to_the_lower_of_its_persisted_checkpoint_and_coverage and BPlusLeafGrainTests.The_coverage_lag_tick_makes_a_live_written_leafs_pin_usable_without_a_replay. |
Duplicate |
A second activation of L, or the next one, starts from the shared snapshot and must claim before it appends stamped | BPlusLeafGrain.ExecuteActivationReplayAsync rehydrates from the snapshot (BPlusLeafGrain.TryRehydrateFromSnapshotAsync); its own LeafAppendEpochFence claims afresh. Environment: once in the model. |
Yes: LiveCheckpointAdvanceIntegrationTests.A_stale_duplicates_append_before_the_claim_is_read_before_the_leaf_advances_past_it and BPlusLeafGrainTests.Activation_rehydrates_cache_from_snapshot_when_offset_exceeds_checkpoint. |
Restart |
A WAL shard restart, a reactivation or a move's cutover, resets the in-memory unstamped watermark to the recovered allocator head minus one | WalShardGrain.OnActivateAsync sets WalShardGrain._unstampedWatermark from the recovered WalShardGrain._nextOffset. Environment: once in the model. |
Yes: WalShardGrainTests.The_unstamped_watermark_restarts_at_the_recovered_head. |
Evict |
Environment. The WAL shard evicts L's foreign-high entry to bound memory, raising its eviction floor to the entry's highest offset | WalShardGrain.FoldLeafAuthorsLocked. The model's one floor is L's, and production keeps exactly that value per leaf (#5851, O2b; #6166): L's evicted high in a sorted array behind a negative bit filter, raised max-only by a later eviction of L and read by L as the maximum of its own entry, its own evicted high and the restart floor - the same value for L, and no floor at all for a leaf never evicted. |
Yes: WalShardGrainTests.The_foreign_high_resets_below_the_recovered_head_and_never_drops_on_a_fold, WalShardGrainTests.An_eviction_raises_only_the_evicted_leafs_floor and WalShardGrainTests.A_large_fold_holds_back_no_leaf_it_did_not_evict. |
KeyMove |
A split or consolidation hands keys to L: the shard root, in its own turn as it links the split (C6), raises its routing generation with no WAL claim, and closes L's marker with a deferred head | ShardRootGrain.CloseDeferredSplitHandOffsAsync from ShardRootGrain.LinkSplitAsync, and the pre-arm branch of ShardRootGrain.CloseReclaimHandOffAsync, writing HandOffMarkerCore.CloseDeferred. Once the raise is durable, the link witnesses each leaf sibling's own link on that sibling's donor close (ShardRootGrain.WitnessSplitLinksAsync, HandOffMarkerCore.WitnessLink, HandOffClose.LinkedGeneration); only that witness resolves the donor bound (HandOffMarkerCore.IsPendingDonorBound), never a raise for another link, and a failed raise or witness re-surfaces the division with the bound pending (a5e2e2ef's B2 on #5866). The witness is also held at marker level (LeafHandOffState.SiblingLinkedGeneration), so one that lands before the donor's close is inherited by the close written later (G1). The witness ends the bound - the exemption, the latch, demotion and promotion - but never the close's carriage: the sibling's stamps keep it at each partition until Resolve(a) there (G4; LeafAppendEpochFence.SetCarriedCloses, HandOffMarkerCore.CollectCarriedDonorCloses). |
Yes: HandOffMarkerCoreDonorBoundTests.A_witness_that_lands_before_the_donors_close_resolves_the_close_written_after_it, HandOffMarkerCoreCarryTests.A_witnessed_close_stays_carried_until_its_siblings_arm, BPlusLeafGrainTests.A_witnessed_close_unarmed_at_a_partition_is_still_carried_by_its_stamps, BPlusLeafGrainTests.A_link_witnessed_before_the_donors_close_leaves_no_close_pending, HandOffMarkerCoreDeferredTests, WalShardGrainTests.An_arm_resolves_a_deferred_generation_so_a_write_admitted_before_it_is_refused, HandOffMarkerCoreDonorBoundTests.A_donor_bound_stays_pending_until_its_own_link_is_witnessed, ShardRootGrainSplitLinkTests.A_split_link_never_closes_its_sibling_marker_and_witnesses_its_own_link_after_the_raise and ShardRootGrainSplitLinkTests.A_split_link_whose_witness_fails_leaves_its_donor_unacknowledged_and_the_bound_pending. |
OtherReceiverArm |
Environment (C5). A later key-moving close into another receiver, whose arm re-claims that later generation at the partition first | Another receiver's WalShardGrain.ArmAppendEpochAsync. |
Yes: WalShardGrainTests.An_arm_resolving_a_deferred_generation_below_a_loaded_one_takes_the_current_head. |
OtherLinkRaise |
Environment (L1; #5866 B1, B2). After the donor's close and before L's link, another split's link raises the shard root's routing generation, so a stale donor's routed write of L's keys is admitted above the generation the close admitted. The donor's bound on L's marker stays pending: no raise but L's own link's resolves it | Another split's ShardRootGrain.CloseDeferredSplitHandOffsAsync raising the shard root's generation. |
Yes: WalShardGrainTests.A_non_closing_record_admitted_at_a_later_generation_is_counted_while_the_close_is_pending. |
LinkWitness |
(#5866 B2). After L's own link's raise succeeded, the shard root records it on L's marker; only that witness resolves the donor's bound (BoundPending). After the link the receiver still carries the key-moving close's deferred head (CloseCarried) until its arm resolves it |
ShardRootGrain.WitnessSplitLinksAsync, after the batch's raise is durable, writes HandOffClose.LinkedGeneration on each linked sibling's donor close (HandOffMarkerCore.WitnessLink); HandOffMarkerCore.IsPendingDonorBound reads the bound as pending until then, for the claim, the stamp's pending closes and the exemption alike. |
Yes: HandOffMarkerCoreDonorBoundTests.A_donor_bound_stays_pending_until_its_own_link_is_witnessed, ShardRootGrainSplitLinkTests.A_split_link_never_closes_its_sibling_marker_and_witnesses_its_own_link_after_the_raise, ShardRootGrainSplitLinkTests.A_split_link_whose_witness_fails_leaves_its_donor_unacknowledged_and_the_bound_pending and BPlusLeafGrainTests.A_deferred_sibling_is_proven_again_once_its_own_link_is_witnessed_and_reachable. |
StaleRouteAlloc |
Environment. A stale donor activation still routes L's keys to itself and appends one under the old generation as PreArm: admitted only while the loaded generation is not above it. The WAL counts it in staleHigh whatever generation admitted it, a raise another split's link made since the close included (#5866 B1) |
WalShardGrain.AdmitGenerationLocked; WalShardGrain.StaleHighLocked. |
Yes: WalShardGrainTests.An_arm_resolves_a_deferred_generation_so_a_write_admitted_before_it_is_refused and WalShardGrainTests.A_non_closing_record_admitted_at_a_later_generation_is_counted_while_the_close_is_pending. |
UnroutedAlloc |
Environment (C4). The stale donor's write with no routing stamp, appended truly unstamped, raising the shared watermark. The writer stands for any leaf other than L, a deferred orphan sibling's included: a write with no routing generation goes unstamped whatever the writer's fence returns, PreArm from a deferred sibling's fence too (#5851 D5), since attributed to that sibling it would be invisible to the owner |
WalFencedAppendDispatch takes the unstamped method for a PreArm write with no routing (WalShardGrain.RaisesUnstampedWatermark defends it at the WAL). |
Yes: WalShardGrainTests.A_routed_pre_arm_append_never_raises_the_shared_watermark_and_an_unrouted_one_does and LeafAppendEpochFenceTests.DeferredSiblingStampsUnrouted. |
SpanUnstampedAlloc |
Environment (#5851 K1). An unstamped write of a key in a span outside L's range - a latched or orphaned author's, a C4 unrouted one - tabled by its key; a reader whose range excludes the key skips it (K2) | The partition's key-range unstamped table (#5851's O2c member). | Yes: WalShardGrainTests.UnstampedSpanWriteUntabled. |
Widen |
Environment (#5851 K4). L's range absorbs the span (a fold, merge or restore): the widening path drains the span's appends in flight and hands L every applied record of it, and from then on L's reads, passing the range it owns now in the same turn, cover the absorbed span | The widening paths' hand-off (fold, merge, restore), and the reader's range passed with its read (#5851's O2c member). | Yes: BPlusLeafGrainTests.UnstampedFilterUsesStaleRange and BPlusLeafGrainTests.WidenWithoutDrain. |
Recreate |
Environment (H's AbsentMarkerHolds). L's tree is purged and re-created: its marker is deleted and so not initialised, and the purge retires every raised epoch, so no activation is current; one that never claimed may claim afterwards |
The leaf's clear deletes its marker row (BPlusLeafGrain.ClearHandOffMarkerAsync, HandOffMarkerRows.ClearLeafAsync), and the re-seeded shard root retires a predating marker (ShardRootGrain.RetirePredatingHandOffMarkerAsync); the epoch retirement is E's. |
Yes: TreeFenceRowPurgeIntegrationTests.A_purge_retires_every_fence_row_and_the_re_created_tree_starts_above_the_floor, TreeFenceRowPurgeIntegrationTests.A_tree_re_created_after_a_purge_that_retired_nothing_never_adopts_its_markers and BPlusLeafGrainTests.An_uninitialised_leaf_marker_holds_until_the_leaf_adopts_its_shards_flag. |
StraddlerAlloc |
Environment (R's StraddlerBelowInit). A write a shard root of the purged incarnation admitted is allocated, only before the re-created incarnation's first initialisation |
The WAL refuses a straddler at or below its initiator's routing floor (WalShardGrain._generationFloors), and its seam retry never re-stamps it (ShardRootGrain.ThrowIfAdmittedUnderPurgedIncarnationAsync). |
Yes: TreeFenceRowPurgeIntegrationTests.A_shard_root_of_a_tree_id_with_a_floor_seeds_and_claims_its_first_generation_above_it and TreeFenceRowPurgeIntegrationTests.A_purge_retires_every_fence_row_and_the_re_created_tree_starts_above_the_floor. |
MarkInit |
Environment (R's InitHeadCoversPriorAllocations and H). The re-created incarnation's first initialisation claims its seeded generation everywhere, records heads above every earlier allocation as a close, max-merged into closedAt like any other, and initialises the marker state |
ShardRootGrain.FenceRecreatedIncarnationAsync, then ShardRootGrain.TryInitialiseHandOffMarkerAsync; the leaf adopts the shard's flag in BPlusLeafGrain.ReadLiveAdvanceHandOffAsync. |
Yes: TreeFenceRowPurgeIntegrationTests.A_shard_root_of_a_tree_id_with_a_floor_seeds_and_claims_its_first_generation_above_it and BPlusLeafGrainTests.An_uninitialised_leaf_marker_holds_until_the_leaf_adopts_its_shards_flag. |
FreeTarget(a) |
The claimless live advance (#5837) fixes its target: the highest own applied append | LeafLiveAdvanceCore.FreeTarget. |
Yes: BPlusLeafGrainTests.FreeAdvanceViewBeforeHeads. |
FreeCommit(a) |
After the target, the advance reads L's marker view and moves the read position to the target, with no claim, iff the marker is initialised with no window open, and the read position is at or above the close heads, the reported foreignHigh, the shared watermark and, while a deferred close is pending, the reported staleHigh, with every own append at or below the target applied |
LeafLiveAdvanceCore.TryFreeAdvance from BPlusLeafGrain.TryAdvanceLiveCheckpointAsync. |
Yes: BPlusLeafGrainTests.FreeAdvanceIgnoresForeignHigh, BPlusLeafGrainTests.FreeAdvanceIgnoresCloseHeads, LeafAppendEpochFenceTests.A_claimless_view_needs_a_report_that_carried_every_pending_close and LeafAppendEpochFenceTests.More_pending_closes_than_a_stamp_carries_hold_the_claimless_advance. |
FetchReport(a) |
(#5851 R4.) A leaf with no own append in flight fetches, read-only on the tick, the report an append response carries - the foreign high, the carried stale high and the unstamped high - and takes the allocator head as its free advance's target; FreeCommit admits the advance only past those bounds, so an idle leaf's pin moves without a write. Over-approximation: production is stricter in two ways, so the model checks a superset of its behaviours: its target is the leaf's own high, never the head (F1), and it reports the shared unstamped watermark, as the append response does (R1), which is at or above the key-filtered high the model reports. A claimed partition never fetches in production; the model lets any activation fetch. A fetch that omits any bound an append response carries, or a reader that fetches without the close it carries, loses a write (ReadPositionHonestFetchReportOmitsStaleHigh, ReadPositionHonestFetchReportOmitsUnstampedHigh, ReadPositionHonestFetchReportReaderWithoutCarriedClose; a5e2e2ef's F1-F7) |
The report fetch of #5851's R4 member on the coverage-lag tick: LeafAppendEpochFence.TryGetReportReader supplies the reader the fetch carries. |
Yes: WalShardGrainTests.ReportFetch_equals_the_report_an_append_by_the_same_reader_would_carry, BPlusLeafGrainTests.ReportFetch_a_carried_stale_high_above_the_checkpoint_holds_the_advance, WalShardGrainTests.ReportFetch_reports_the_shared_unstamped_watermark, LeafAppendEpochFenceTests.ReportFetch_the_reader_is_the_stamp_a_pre_arm_append_would_carry, LeafAppendEpochFenceTests.ReportFetch_a_report_whose_reader_did_not_carry_a_close_carried_now_does_not_count, BPlusLeafGrainTests.ReportFetch_an_idle_leaf_whose_report_predates_its_carried_close_advances_on_the_tick_to_its_own_high and BPlusLeafGrainTests.ReportFetch_never_raises_the_target_above_the_own_high. |
SplitHeads(a) |
A split captures each partition's allocator head with the donor's foreignHigh, shared watermark and staleHigh, in one WAL-shard turn (D4) |
BPlusLeafGrain.CaptureSplitCutAsync. The cut advance of a leaf that applies no writes of its own reads the same cut (#6166, BPlusLeafGrain.TryAdvanceCheckpointFromCutAsync): from the stall drive for its activation, and at a warm activation, inside the replay barrier, for no activation, so every activation's records bound it (BPlusLeafGrain.TryAdvanceActivationFromCutAsync). |
Yes: WalShardGrainTests.A_split_cut_reads_the_head_and_every_bound_in_one_turn, BulkAppendChunkCostIntegrationTests.A_bulk_appended_leaf_behind_the_right_edge_does_not_rescan_the_log_appended_after_it and BulkAppendChunkCostIntegrationTests.A_bulk_born_leaf_reactivated_at_its_birth_checkpoint_does_not_replay_the_seed_appended_after_it. |
SplitView(a) |
After the heads, the split reads L's marker view, possibly while the drain of its own appends is still applying them (V3); the commit evaluates the guard after the drain | The marker read in BPlusLeafGrain.CompleteSplitAsync, after BPlusLeafGrain.CaptureSplitCutAsync; the cut advance's view read after its cut, its guard BPlusLeafGrain.CutAdvanceTarget, shared with the split (#6166). |
Yes: BPlusLeafGrainTests.SplitViewBeforeHeads. |
SplitCap(a) |
The split's fallback when the hint guard fails (#5851 O2c): only after the drain of the donor's own appends below the heads, the donor hands the sibling its committed read frontier as the hint and its rows at or below it; a free advance just before the narrow raises that frontier first. The cap rests on the frontier advancing only over a contiguous applied prefix (a replay of the durable prefix, or the applied-prefix tracker), so its rows reach only offsets at or below it and every own append still in flight is above it: SplitCap without the drain holds in C. The drain (#5706) stays a production precondition, load-bearing for the D4 hint and for the by-key transfer: production moves the range from the donor's cache by key, not by offset, and an apply-before-append path (the batched CRDT apply LeafAppendEpochFence.OnStale retries) can hold a row whose append has not resolved, which without the drain would reach the sibling and make a write reported as failed visible. The by-key transfer's own detector, and those of the cap's mutations, come with #5851's O1 member, built only if the combined S2 timing needs it |
ShardRootGrain.CapAtReadFrontier, after the drain in BPlusLeafGrain.CompleteSplitAsync. |
Yes: BPlusLeafGrainTests.Split_caps_the_sibling_hint_at_the_donors_replay_frontier, BPlusLeafGrainTests.Split_does_not_advance_the_donor_past_its_own_replay_frontier and LeafAppendEpochFenceTests.A_drain_waits_for_the_appends_that_started_before_it_only. |
SplitCommit(a) |
After the cut, the donor reads its marker view and, under the advance's guard with the heads in place of the target, hands the sibling the heads minus one as its hint | BPlusLeafGrain.CompleteSplitAsync, advance before the cap (ShardRootGrain.CapAtReadFrontier otherwise). |
Yes: BPlusLeafGrainTests.SplitHintWithoutBound and BPlusLeafGrainTests.SplitHintAboveHeads. |
DonorAlloc |
Environment. The live donor admits a write for L's keys after the split's heads and before its narrow, attributed to the donor | BPlusLeafGrain.SetStampedAsync on the donor. |
Yes: LeafAppendEpochFenceTests.The_split_window_records_each_own_moved_key_offset. |
DonorNarrow |
The donor narrows its span, persisting its link obligation in the same write (transfer condition (a)) | BPlusLeafGrain.CompleteSplitAsync, the narrow's persist with LeafNodeState.UnlinkedSplitSiblingId. |
Yes: BPlusLeafGrainTests.PreArmDonorFencesAfterPersistBeforeClose. |
DonorClose |
After the narrow and the drain, the donor closes L's birth window, in one conditional marker write, with the head one above its moved-key writes since the heads (all tokens', on a resumed split) and the deferred bound (rule S) | BPlusLeafGrain.CloseSplitHandOffAsync, writing HandOffMarkerCore.CloseWithDeferredBound. The conditional write is on the ETag of the row the donor activation's own open wrote in this split (HandOffMarkerRows.UpdateLeafFromAsync, a5e2e2ef's E1-E5): on a resumed or recovered split, or when the open wrote nothing, it reads the row first, and any ETag miss re-reads it and re-checks the token, a closed token being already settled. |
Yes: LeafAppendEpochFenceTests.A_drain_waits_for_the_appends_that_started_before_it_only, HandOffMarkerCoreDonorBoundTests.A_donor_close_records_its_heads_and_bound_in_one_change, ClaimlessSplitIntegrationTests.A_pre_arm_split_closes_its_sibling_with_the_donor_bound_in_one_write, WalShardGrainTests.A_resumed_close_reads_every_activation_s_records_never_below_the_floor, BPlusLeafGrainTests.A_fresh_split_closes_from_its_own_open_row_and_an_intervening_write_forces_the_read, BPlusLeafGrainTests.A_resumed_split_closes_on_the_read_path and BPlusLeafGrainTests.A_marker_copy_carries_every_property. |
DonorRestart |
Environment. The donor restarts after taking the heads and a new activation resumes the split from SplitInFlight |
BPlusLeafGrain.CompleteRecoverySplitUnderGateAsync. |
Yes: WalShardGrainTests.A_resumed_close_reads_every_activation_s_records_never_below_the_floor. |
LinkRestart |
Environment. The donor restarts after closing L and before the link; the link is re-driven from the durable obligation (transfer condition (b), L3) | BPlusLeafGrain.CompleteRecoverySplitUnderGateAsync from LeafNodeState.UnlinkedSplitSiblingId. |
Yes: BPlusLeafGrainTests.PreArmDonorFenceFailureLeavesSiblingOpenAndObligationPending and ShardRootGrainSplitLinkTests.A_split_link_whose_raise_fails_leaves_its_donor_unacknowledged. |
Straggler(a) |
The donor's writes since the heads reach L as an append of L's own activation, applied in the same call, under the per-leaf transfer class: in its tracker and its token's foreignHigh, never a claim, never the shared watermark (T1-T3) |
BPlusLeafGrain.MergeEntriesAsync under the routing-mutation gate, checking its current span and stamping the routing generation it was established under. A transfer refused stale refreshes that generation as an admission would (BPlusLeafGrain.TryRefreshSpanRoutingAsync: the shard's marker read fresh, no hand-off open over the span, then descent for the transfer's lowest and highest keys both to L or, before the link, both to its donor, a5e2e2ef's F1) and retries routed once; only a failed refresh appends it unstamped (#5851, ruling 1). The refresh trusts only a decided descent (#5876): ShardRootGrain.IsReachableByDescentAsync answers false on an undecided one, so a refresh whose descent passes an internal node at or above its declared high bound - a node divided while its parent does not yet route to the right half - is refused (V1); a refresh that succeeds is re-checked against the receiver's current span before the routed retry (BPlusLeafGrain.SplitTransferRoutingFor). |
Yes: BPlusLeafGrainTests.TransferNotInForeignHigh, ClaimlessSplitIntegrationTests.A_pre_arm_split_transfer_never_raises_the_shared_watermark, BPlusLeafGrainTests.A_stale_transfer_refreshes_its_span_generation_and_retries_routed, BPlusLeafGrainTests.A_pre_link_sibling_refreshes_through_its_donors_reachability, BPlusLeafGrainTests.A_stale_receiver_whose_upper_keys_moved_is_never_routed, BPlusLeafGrainTests.A_stale_transfer_without_an_admissible_refresh_appends_unstamped, BPlusLeafGrainTests.An_F1_refresh_during_a_link_batch_does_not_route and BPlusLeafGrainTests.A_refreshed_transfer_whose_keys_left_the_receivers_span_appends_unstamped. |
OrphanForward |
Environment. A stale duplicate forwards an acknowledged write to an orphan sibling; the record is attributed to the first forwarder under the empty token while the orphan's marker holds the token open or the donor's close pending (condition 4, F1-F2) | BPlusLeafGrain.TryResolveSpanForwardTarget to BPlusLeafGrain.SetStampedAsync with WalAppendStamp.Forwarder; WalShardGrain.NoteLeafAuthorLocked under the forwarder and the empty token (an empty GUID). Production never ends the attribution's scope (F1 is not implemented): a superset of the modelled attribution, at cost only. |
Yes: WalShardGrainTests.A_forwarded_record_is_foreign_to_every_activation_of_its_forwarder, WalShardGrainTests.A_re_forward_is_foreign_to_every_forwarder_on_its_chain and WalForwardChainTests.A_stamp_carries_every_hop_of_its_chain_in_order. |
OrphanClose |
Environment. The orphan's donor closes its window, leaving its deferred close pending | BPlusLeafGrain.CloseSplitHandOffAsync on the stale duplicate. |
Yes: WalShardGrainTests.A_forwarded_record_is_foreign_to_every_activation_of_its_forwarder. |
ProveReach |
An unlinked L's reachability proof after its donor's close: proven once linked; left undecided, and retried, while the donor's close is pending, the gate is in pre-arm and no orphan repair has begun; latched otherwise | BPlusLeafGrain.ProveStampReachabilityCoreAsync, deferring through LeafAppendEpochFence.OnReachabilityDeferred: a deferred activation stamps PreArm under the pre-arm gate only (an unrouted write still goes unstamped, C4), never claims, arms or advances claimlessly, and proves again after a backoff; a latch is never undone (a5e2e2ef's D1-D5 on #5851). The live-advance view applies the same rule (BPlusLeafGrain.ReadLiveAdvanceHandOffAsync): a P1-proven activation with a pending bound is demoted to deferred, so it never claims before its own link (C's UnlinkedNeverClaims), and LeafAppendEpochFence.PromoteDeferredReachable proves it again once reachable with no bound pending (G2: linked is not witnessed); a witnessed bound latches (B2). An activation proven without reading its marker - at its split birth (P1) or under the pre-arm gate - proves again, with the marker, before its first eager claim, and neither a claim nor an arm is taken while a bound is pending (LeafAppendEpochFence.HasPendingCloses; G3). An unreachable verdict with no structural witness is confirmed before it latches (#5872, a5e2e2ef's R1-R5): LeafAppendEpochFence.OnUnreachableVerdict leaves the first undecided, appending unstamped and never pre-arm for the backoff, and latches only a second one after it; BPlusLeafGrain.OnUnreachableVerdict latches at once on orphan repair, a reclaim's absorption (LeafNodeState.ReclaimRetired) or a superseded activation, from the proof path and the view path alike, and a reachable view drops the suspicion (LeafAppendEpochFence.OnReachableVerdict). C's reachability is exact, so this confirmation is a gap entry, not a step. The descent verdict is three-valued (#5876, a5e2e2ef's D1-D3 as revised by V1-V5): ShardRootGrain.GetDescentVerdictAsync answers DescentVerdict.Undecided when the key lies at or above the declared high bound of an internal node on its path (RoutingTableSnapshot.HighKeyExclusive: the node divided and its parent does not yet route to the right half), or when a root-identity mutation (ShardRootGrain.EnterStructuralRouting) was in flight before or after the descent or completed during it; a link batch elsewhere leaves it decided. A deferred activation is demoted on an unreachable suspicion too (S1), and the proof and the view (LeafLiveAdvanceView.ReachabilityUndecided) treat it as no verdict: unstamped for the backoff, no latch, no proof - except that the view leaves an activation not yet proven without a backoff (LeafAppendEpochFence.OnLiveViewUndecided, #6166): it stamps nothing either way, and its proof is a fresh descent of its own, so the backoff would only send a bulk-seeded leaf's first live write unstamped. A second unreachable verdict must be decided and from a later read. |
Yes: BPlusLeafGrainTests.PendingDonorCloseMarksProven, BPlusLeafGrainTests.LatchUnreachableWithPendingDonorClose, BPlusLeafGrainTests.A_pre_link_sibling_with_a_pending_donor_bound_is_deferred_and_stamps, LeafAppendEpochFenceTests.DeferredSiblingStampsUnrouted, LeafAppendEpochFenceTests.A_deferred_sibling_stamps_only_under_the_pre_arm_gate and LeafAppendEpochFenceTests.A_deferred_sibling_proves_again_after_its_backoff_and_a_latch_wins, BPlusLeafGrainTests.A_birth_proven_sibling_whose_shard_raised_for_another_link_defers_and_never_claims, BPlusLeafGrainTests.A_deferred_sibling_is_proven_again_once_its_own_link_is_witnessed_and_reachable, BPlusLeafGrainTests.A_sibling_whose_own_link_is_witnessed_but_is_unreachable_latches, BPlusLeafGrainTests.A_reachable_sibling_whose_link_is_unwitnessed_stays_deferred_and_never_claims_under_the_eager_gate, BPlusLeafGrainTests.A_birth_proven_sibling_never_claims_before_its_link_after_the_gate_turns_eager, BPlusLeafGrainTests.A_reachable_leaf_whose_view_reads_unreachable_once_appends_unstamped_then_is_proven, BPlusLeafGrainTests.A_leaf_unreachable_on_both_reads_across_the_backoff_latches, BPlusLeafGrainTests.A_structural_witness_latches_on_the_first_unreachable_verdict, BPlusLeafGrainTests.A_transient_unreachable_verdict_at_the_split_cut_takes_no_hint_and_does_not_latch, LeafAppendEpochFenceTests.An_undecided_activation_stamps_null_never_pre_arm, ShardRootGrainDescentVerdictTests.A_parent_lagging_a_completed_internal_split_yields_undecided_never_a_non_owner, ShardRootGrainDescentVerdictTests.A_link_batch_in_another_subtree_leaves_the_descent_decided, BPlusInternalGrainTests.A_split_publishes_its_narrowed_bound_with_its_children_in_one_step, ShardRootGrainOrphanAuditGapTests.An_audit_descent_through_a_parent_lagging_an_internal_split_finds_nothing, ShardRootGrainDescentVerdictTests.A_routing_mutation_completing_mid_descent_is_undecided, ShardRootGrainDescentVerdictTests.After_the_batch_a_descent_is_decided_as_before, ShardRootGrainDescentVerdictTests.Every_routing_structure_mutation_site_is_bracketed, BPlusLeafGrainTests.Two_undecided_or_same_turn_reads_never_latch, LeafAppendEpochFenceTests.An_undecided_live_view_holds_off_a_proven_activations_stamps_but_not_an_unproven_ones_proof and LeafAppendEpochFenceTests.A_deferred_activation_suspected_unreachable_never_stamps_pre_arm_after_its_backoff. |
GateToEager |
Environment. The gate's view flips from pre-arm to eager | ClusterManifestWalAppendFenceGate.IsPreArmOpen. |
Yes: BPlusLeafGrainTests.PendingDonorCloseMarksProven. |
StartRepair |
Environment. Orphan repair begins on L's range; L's next proof latches | LeafLiveAdvanceView.For. |
Yes: BPlusLeafGrainTests.PendingExemptionOverridesOrphanRepair. |
Reactivate |
Environment. L's birth activation deactivates, and a later call - a re-init, a recovery re-call, a stale donor's late InitializeSiblingAsync - activates it again, unproven (P1, P3) |
BPlusLeafGrain.InitializeSiblingAsync, proving only on the call that seeds the write-once slots. |
Yes: BPlusLeafGrainTests.BirthProofOnReinit. |
NarrowMem(a) |
An activation of L narrows its span in memory for a split, stamping the narrow's identity (the sibling id) as its tag | BPlusLeafGrain.CompleteSplitAsync, the in-memory narrow. |
Yes: LeafAppendEpochFenceTests.A_stamp_carries_the_persisted_narrow_until_an_etag_conflict_withdraws_it. |
PersistNarrow(a) |
It persists the narrow with its link obligation in one conditional write; the first to persist wins, the other keeps only its in-memory narrow | BPlusLeafGrain.CompleteSplitAsync, the narrow's persist with LeafNodeState.UnlinkedSplitSiblingId. |
Yes: BPlusLeafGrainTests.ForwardExcludedWithoutObligation, WalShardGrainTests.A_forwarder_excludes_only_the_forwards_of_its_own_persisted_narrow and WalShardGrainTests.A_stamped_append_excludes_its_own_narrow_from_the_foreign_high_it_reports. |
EvictTag |
Environment. A third narrow tag evicts one from the WAL shard's per-(leaf, partition) top-two forward table, and the evicted tag's forward high folds into the floor every reader counts (X6) | WalShardGrain.LeafAuthors.WithForwardHop, its fold into WalShardGrain.FoldLeafAuthorsLocked's eviction floor. |
Yes: WalShardGrainTests.A_displaced_narrow_tag_folds_into_a_high_no_reader_excludes. |
ReforwardChain(h) |
L's stale activation forwards one of L's keys on, and the chain runs h hops: the stamp carries every forwarder up to k, each attributed under the empty token with its own hop's tag, and a chain past k goes unstamped (F2', C4) | WalForwardChain built by BPlusLeafGrain.TryResolveSpanForwardTarget; WalShardGrain's attribution to each forwarder. Production never excludes a chain hop from a reader's foreignHigh (S-b): the per-hop X1 exclusion is not taken, at a cost only. |
Yes: LeafLiveAdvanceCoreTests.ChainHopsAreNeverExcluded, WalShardGrainTests.A_re_forward_is_foreign_to_every_forwarder_on_its_chain, WalForwardChainTests.A_stamp_carries_every_hop_of_its_chain_in_order, WalForwardChainTests.A_forward_past_the_bound_overflows_the_chain_and_is_never_stamped and LeafAppendEpochFenceTests.A_write_past_the_forward_bound_appends_unstamped. |
ForwardIntoL(a) |
Before the link, L's donor forwards a new write of L's keys into L: L appends and applies it as its own, and the WAL attributes it to the donor under the empty token with the tag of the split that created L, which L's staleHigh excludes; the response carries the donor's staleHigh, as every routed response does (MF1) |
WalShardGrain's per-donor staleHigh read, excluding forwards tagged with the reader's own split. |
Yes: WalShardGrainTests.The_stale_high_excludes_only_the_forwards_of_the_split_that_created_the_receiver and WalShardGrainTests.A_forward_into_its_receiver_reports_the_donor_stale_high. |
StaleForwardOther |
A stale D' forwards one of L's keys into another orphan under that orphan's split tag; L's staleHigh counts it |
The same read: only the reader's own split tag is excluded. | Yes: WalShardGrainTests.The_stale_high_excludes_only_the_forwards_of_the_split_that_created_the_receiver. |
StaleEpochOnlyAlloc |
A stale duplicate of the donor, under a non-closing token, makes an epoch-only write of one of L's keys before the link's fence; the WAL counts it in the donor's staleHigh (the obligation carried from #5841, a5e2e2ef's H2) |
WalShardGrain.NoteLeafAuthorLocked for a WalRoutingStamp.None append; WalShardGrain.StaleHighLocked. |
Yes: WalShardGrainTests.StaleHighOmitsEpochOnlyNonClosingToken. |
StaleRefreshAlloc |
The stale donor's transfer, refused as stale after L's re-claim, is refreshed at the current generation and re-admitted only while a descent for the batch's min and max keys still reaches the donor; once the key-moving close has moved them the write is forwarded instead (#5851 F1). The descent is assumed exact when it decides: a descent read while a link batch, a child link or a routing mutation is in flight, or across a moved routing sequence, is Undecided and refuses the refresh (#5876's D1 rule). ReadPositionHonestRefreshTrustsUndecidedDescent is red, and its mutant also breaks SnapshotHonest and NoTrimPastAcked: the GC trims the acknowledged write. Its author is a stale duplicate of the donor that still declares the old span (StaleDonor): after a successful refresh production re-checks the batch against the author's own declared span before the routed retry (BPlusLeafGrain.AppendTransferAfterStaleAsync, BPlusLeafGrain.SplitTransferRoutingFor), so a live donor that has narrowed falls back to unstamped, which raises the watermark L replays; only a duplicate holding the old span passes that re-check, and the model's stale author is that duplicate |
The stale-generation transfer refresh, BPlusLeafGrain.TryRefreshSpanRoutingAsync, with its reachability descent. |
Yes: BPlusLeafGrainTests.A_stale_receiver_whose_upper_keys_moved_is_never_routed. |
ForwardMoved(a) |
It forwards a new acknowledged write of a moved key, attributed to L under the empty token and its narrow's tag, before or after its persist; a reader excludes it only when its own persisted span is that narrow (X1-X4) | BPlusLeafGrain.TryResolveSpanForwardTarget; WalShardGrain.LeafAuthors.WithForwardHop per tag, excluded in WalShardGrain.ForeignHighLocked. |
Yes: WalShardGrainTests.A_forwarder_excludes_only_the_forwards_of_its_own_persisted_narrow and WalShardGrainTests.A_stamped_append_excludes_its_own_narrow_from_the_foreign_high_it_reports. |
Stutter |
Natural termination | Not a protocol step; a stuttering successor so TLC does not report a quiescent state as a deadlock. | Not applicable: not a protocol step, so there is no production behaviour to detect. |