Backward compatibility
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 backward-compatibility.md, and llms.txt lists every page.Part of Live checkpoint advance: fenced redesign.
lattice 10.2.0 shipped (tag lattice-v10.2.0). This section shows that the design
breaks nothing that release relies on, in storage, on the wire, or across a
mixed-version cluster, and lists every observable behaviour change.
Persisted formats
| Format | Change | 10.2.0 data under the new build | New data under 10.2.0 |
|---|---|---|---|
| WAL records | None. Stamps, the routing generation and the watermark travel as call arguments and response fields, never in a stored record. Range deletes are fenced, not clipped, so their records keep their shape. | Read unchanged | Read unchanged |
LeafNodeState, ShardRootState, WalShardFloorState |
None: no field is added. The bulk hint lives in a new row (S7). | Read unchanged | Read unchanged. A 10.2.0 silo that rewrites one drops nothing the design needs, because nothing new lives there. |
| New rows (the table at the top of The design) | New state types, new aliases, reserved grain types | Not present: an absent row reads as "no claim", "floor 0", and "marker not initialised", which holds the advance; the leaf falls back to replay. An absent marker never reads as closed (B2). | Never read by 10.2.0, which knows none of these types. A rollback leaves them in place, harmless; re-upgrading resumes from them. |
JSON-backed providers (#5579). A host's grain storage normally serializes the new
state types through LatticeGrainStorageSerializer, in binary, because they are
marked ILatticeBinaryPersistedState. A host that bypasses it falls back to the JSON
serializer, which persists public properties only and must be able to construct every
collection on read. The new state types are written for both: every member is a public
property of a concrete type. Each type gets a round-trip test through the JSON
grain-storage serializer as well as the binary one. The WAL's JSON-backed providers see
no change, because no WAL record changes.
Wire formats
- Grain interfaces, 10.2.0 caller to a new silo.
- No existing grain interface method changes its name, parameters or return type.
- New behaviour arrives only through new methods:
ClaimAppendEpochAsync,AppendStampedAsync,AppendBatchStampedAsync, the stamped leaf-write methods, the stamped shard-root range-delete method,GetHandOffMarkerAsync, and the newITreeRangeDeleteFenceGrain. - A 10.2.0 silo calls only the existing methods, and a new silo serves them exactly as 10.2.0 does. Its appends are unstamped, so they are admitted and reported, and a write reaching a leaf through an existing leaf method is appended unstamped (S3).
- Grain interfaces, new silo to a 10.2.0 silo. A new silo calls a new method only while its gate is open. The race where a 10.2.0 silo joins before the gate observes it is pinned by a mixed-version test, and only its definite "method unknown" failure is re-issued unstamped (Racing the gate).
- Serializable types and exceptions.
- The new request and response types have new aliases. No existing alias changes, and
no existing
[Id]is renumbered or removed.LatticeWalQuiescingExceptionis untouched (revision 2'sReasonfield is withdrawn). - The one additive change to an existing serialized type. A supersession is the
existing internal
LeafRetiredException, aliasol.lrtunchanged, with two trailing members appended after[Id(0)] LeafId:[Id(1)] ActivationSupersededand[Id(2)] SupersededEpoch. A 10.2.0 silo's deserializer skips the two trailing fields, so a 10.2.0 shard root that reaches a newer leaf across a gate race sees exactly today's retired-leaf refusal and retries it until its deadline, as everyLeafRetiredExceptionhandler does (a shard-root retry, never "skip this leaf"). A newer caller retries a supersession at its seam against the live activation. Member 2's self-fence uses the same form (section 2).LeafRetiredExceptionWireCompatibilityTestspins the trailing-field skip in both directions, and the alias has its own test. No new exception type crosses a silo boundary.
- The new request and response types have new aliases. No existing alias changes, and
no existing
- Cross-cluster replication. Shipped records are WAL records, which are unchanged, so a 10.2.0 peer and a new peer exchange exactly what two 10.2.0 peers exchange, in both directions. A replicated write applied on the receiving cluster goes through the receiving leaf's own append path: stamped on a new cluster with the gate open, unstamped otherwise; a rejection is retried below the applier (section 5).
Mixed-version rollout
Fencing and the live advance turn on only once every active silo supports them, and off again if a 10.2.0 silo joins. At every moment:
- a 10.2.0 silo's unstamped append is never rejected;
- a retirement on a 10.2.0 silo keeps the leaf's epoch row, so epoch values do not recur after it, and the floor needs the row value (#5641) only from new-build clears, which pass it;
- it is never skipped by an advance, because it is reported and must be read before any activation arms past it;
- an own unstamped append, made while an activation's view of the gate was closed, reports itself;
- a hand-off begun before the gate opened holds every owner it reaches until it resumes, opens its marker and closes it by fence;
- a purge that finishes on 10.2.0 leaves the tree's fence rows, and the new build's re-seed catches them up before the tombstone is lifted (section 2, "A purge that finishes on 10.2.0"). A re-seed on a 10.2.0 silo, the range-delete fence state the purged incarnation left, and a cross-shard straddler spanning the 10.2.0 purge are the documented residue: operators should not purge trees during a rolling upgrade from 10.2.0.
The model checks these with four configurations:
WalLiveAdvanceMixed.cfgandWalLiveAdvanceMixedRestart.cfg: an environment authoroappends unstamped.OldNeverRejected(broken byOldNeverRejectedRejectedOnceFenced) andReadPositionHonest(broken byReadPositionHonestUnstampedNotReportedandReadPositionHonestRestartForgetsUnstamped).WalLiveAdvanceGateFlip.cfg: own appends may go unstamped at any time (ReadPositionHonestNoSelfReport).WalLiveAdvanceLegacyHandOff.cfg: a hand-off with no marker writes unstamped before the gate opens (LegacyWrite), the gate opens (OpenGate), the hand-off resumes and admits stamped writes (Resume, which opens the marker), and the owner's marker state is initialised only once no such hand-off is in flight (MarkInit) (ReadPositionHonestResumeWithoutMarker).
A downgrade needs no operator step: the gate closes when the first 10.2.0 silo appears, and leaves fall back to replay as soon as an unstamped append is reported.
Observable behaviour changes
Each change is classed as a compatible bug fix (no documented behaviour changes) or a documented-behaviour change (needs the user's explicit authorisation before production).
| # | Change | Class |
|---|---|---|
| 1 | A stale duplicate activation's write is retried, not accepted. With the gate open, the WAL shard rejects a stale epoch's append; the stale activation deactivates, and the seam retry (section 5) reaches the live one. Every caller in the section 5 table sees one write that succeeds, with added latency, or today's deadline outcome. Atomic writes, cross-tree transactions, DeleteAsync, single-key CRDT deltas and replication apply are covered by the seam retry, so none of them fails, rolls back, or counts toward a dead-letter budget where 10.2.0 succeeds. Orleans already promises a single activation, so no caller relies on duplicates. |
Compatible bug fix |
| 2 | A write admitted before a hand-off close, and not yet allocated, is retried. The close's fence rejects it, and its seam re-admits it under the current stamp; span admission or the shard map routes it to the new owner. The callers and their outcomes are those of change 1. | Compatible bug fix |
| 3 | Withdrawn. Revision 2 surfaced an exhausted retry as LatticeWalQuiescingException with a new Reason. The seam retry runs to the operation's existing deadline instead, so there is no exhaustion to surface, no new exception cause, and no change to LatticeWalQuiescingException. |
- |
| 4 | Bulk append over existing rows (#5610, #5614). The graft relocates the rows the bulk range already holds into the new bulk leaf, instead of stranding them. No new exception: a chunk that succeeds today still succeeds. A key both the bulk chunk and another write hold resolves last-writer-wins by HLC stamp, the later-stamped write winning, as 10.2.0 already resolves it on every replica and view, for every free-space key, and on the origin after a replay. Only the origin's pre-replay reads change: keys only the pre-existing rows hold become readable, a later-stamped stranded write is no longer hidden, and counts and scans become exact (#5614). A run below the right edge is skipped as a re-delivery only when every key it carries there is already held with an identical value and metadata; any other run is relocated and merged last-writer-wins, so a refresh's later-stamped values reach every reader as in 10.2.0. The graft narrows and links the old leaf in one persist (#5654). | Compatible bug fix (fixes an origin-versus-replica divergence) |
| 5 | The live advance itself (#5572). A leaf's checkpoint advances without a replay from -1. The WAL GC trims sooner, replay demand falls, and #5570's "carries no usable offset" warnings stop for live leaves. Existing metrics report different values; none changes name, unit or tags. | Compatible bug fix |
| 6 | Range deletes cost more. Each DeleteRangeAsync call opens an intent at the tree's fence grain, opens and closes a range-scoped marker on every shard of the tree, re-claims the tree's range-delete generation once per WAL partition, and disarms every overlapping leaf of the tree for the call's duration. The shard root adds no per-page call: it trusts the generation it is given and asks the fence grain only after a rejection. Stepped range deletes pay this per step (section 2). A range-delete walk that stays unstamped (replication apply, a shadow forward, a gate-spanning fan-out, a 10.2.0 caller, or a page after the intent's deadline) costs every armed leaf on the partitions it reaches a tail replay past it. The record, its result and its feed and history output are unchanged. |
Compatible (cost only) |
| 7 | New metrics. New instruments only, on the existing meter: claims, refusals and rejections by reason, seam retries by caller class, self-fences (orleans.lattice.wal.append_fence.self_fenced), live advances by arming outcome, open markers, and unstamped reports by source (replication apply, shadow forward, gate-spanning fan-out, 10.2.0 caller, census-unstamped, and a range-delete page past its intent's deadline). No existing instrument gains a tag, a tag value, or a new unit. |
Compatible (additive) |
| 8 | New log lines. A deactivation warning for a stale activation, and a debug line when a partition disarms on an unstamped report. #5571's blocked-pin warning keeps its categories. | Compatible (additive) |
| 9 | New storage rows under the reserved grain types listed above, and the TreeRangeDeleteFenceGrain state, appear in the host's grain storage, and a sweep removes orphaned ones. The fence grain's reminder adds one reminder-table row per tree while it has an open intent. They are documented in the tree's storage notes. |
Compatible (additive) |
| 10 | New public configuration. A LatticeOptions switch to turn the live advance off is additive, and defaults to on once the gate opens. |
Compatible (additive) |
| 11 | The first write after a leaf activation is slower. With the gate open, it waits for the activation's claim: a leaf-row read and write, then per partition a grain call with an entry read and write, about four sequential storage round trips. Later writes are unaffected. A cold leaf's first-write latency rises; no result, exception or record changes. | Compatible (latency) |
No change needs the user's authorisation. None changes documented behaviour, and none adds an exception a caller can observe.