Troubleshooting
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 troubleshooting.md, and llms.txt lists every page.A symptom-driven guide to the problems Lattice trees actually hit in production: storage-provider failures on write, startup checks for grain-storage ETag enforcement, slowdowns caused by an in-flight shard split, scans that take far longer than expected, WAL reclamation or replay pathologies, and reads that look stale. Each section is laid out as symptom -> likely cause -> how to confirm -> how to fix.
The centre of the guide is Reading a DiagnoseAsync
report. Nearly every investigation starts by
taking a report and following the field that looks wrong into one of the
sections below.
This guide deliberately does not restate the reference material it points at. Field-by-field definitions live in Diagnostics, the instrument catalog lives in Metrics, and every option named here is described in Configuration.
Take a diagnostic report first
ILattice.DiagnoseAsync returns a TreeDiagnosticReport: a per-tree health
snapshot assembled by fanning out to every physical shard.
var report = await tree.DiagnoseAsync(deep: true, cancellationToken);
Console.WriteLine(
$"tree={report.TreeId} shards={report.ShardCount}/{report.VirtualShardCount} " +
$"live={report.TotalLiveKeys} tombstones={report.TotalTombstones} " +
$"deep={report.Deep} sampledAt={report.SampledAt:O}");
foreach (var shard in report.Shards)
{
Console.WriteLine(
$" shard {shard.ShardIndex}: depth={shard.Depth} rootIsLeaf={shard.RootIsLeaf} " +
$"live={shard.LiveKeys} tombstones={shard.Tombstones} " +
$"ratio={shard.TombstoneRatio:P1} ops/s={shard.OpsPerSecond:F1} " +
$"reads={shard.Reads} writes={shard.Writes} window={shard.HotnessWindow} " +
$"split={shard.SplitInProgress} bulk={shard.BulkOperationPending}");
}
foreach (var split in report.RecentSplits)
{
Console.WriteLine($" recent split: shard {split.ShardIndex} at {split.AtUtc:O}");
}
deep: true is the mode that produces tombstone counts; see
the traps below before you draw a conclusion
from a shallow report. Neither mode is asymptotically cheaper: both walk every shard's
whole leaf chain, and deep: true only reads each leaf's tombstone count
alongside its live count (see Diagnostics).
What makes a dashboard poll affordable is the per-mode report cache described
in the traps.
On a cluster that registers the authorization add-on, DiagnoseAsync - and
GetStorageUsageAsync, used further down - is authorized as a read of the
whole tree. Run the investigation as a caller whose grant covers the whole
tree: a grant scoped to a key prefix or single keys is refused with
LatticeAuthorizationDeniedException rather than narrowed, because the
report's per-shard counts would still disclose the keys they counted. See
Diagnostics.
Reading a DiagnoseAsync report
Tree-level fields
| Field | What a healthy value looks like | What an unhealthy value points at |
|---|---|---|
ShardCount |
The tree's physical shard count. It rises by one with each committed split - adaptive, or driven by an online reshard that grows the tree - and falls by one with each committed fold, which an online reshard that shrinks the tree drives, and automatic shard healing drives when it folds an over-split tree back towards its registry-pinned base shard count. | A value you did not expect means you are looking at a different tree than you think, or splits, folds or healing changed the topology: check RecentSplits and orleans.lattice.shard.splits_committed for splits, and orleans.lattice.shard.consolidations_committed for folds, which RecentSplits never records. See Shard splitting, Online reshard, and ShardHealingEnabled. |
VirtualShardCount |
4096 by default - a compile-time constant - or the slot count an installed app's manifest declared for a tree it created (see Virtual shard space). It is not a runtime option: persisted shard maps reference virtual slots by index. | Nothing to act on - it is the routing map's resolution, not a load signal. See Tree sizing. |
TotalLiveKeys |
Tracks your expected working-set size. | Growth that outruns your model points at Slow scans and admission headroom. Compare against LatticeOptions.MaxLiveKeys if you have set one. |
TotalTombstones |
Small relative to TotalLiveKeys. |
A large share of the total points at tombstone bloat. Only populated when deep: true. |
SampledAt |
Within DiagnosticsCacheTtl (default 5 s) of now. |
Older than the TTL means you are reading a cached report; see the traps. |
Deep |
Echoes the argument you passed. | If it is false, ignore every tombstone field in the report. |
Shards |
One entry per physical shard, ordered by ShardIndex. |
See the per-shard table below. |
RecentSplits |
Empty on a stable tree; a short list after adaptive splits or an online reshard that grows the tree. A fold is never recorded here. | A steady stream of entries points at Concurrent split activity. |
Per-shard fields
| Field | What a healthy value looks like | What an unhealthy value points at |
|---|---|---|
Depth |
0 for a shard with no root yet, 1 while the root is still a leaf, and small (single digits) once the shard has internal levels. |
Depth climbing across shards means the shards hold far more keys than the tree was sized for. See Tree sizing and Tree structure. |
RootIsLeaf |
true while the shard's root is still a single leaf, false once the shard has grown past one leaf. A shard with no root yet (Depth = 0) also reports false. |
Not a fault on its own; read it alongside Depth. |
LiveKeys |
In proportion to the virtual slots each shard owns: roughly even on a tree that has never split. A split moves half of the source shard's slots to a new shard, so each of the two then holds about half the keys of an unsplit peer. | Keys are placed by hashing the whole key into a virtual slot, so key design cannot concentrate keys on one shard. Uneven counts that track slot ownership are the footprint of past splits and healing, not a fault; see Shard splitting. |
Tombstones / TombstoneRatio |
Low. 0.0 on a tree that never deletes. |
A high ratio means deleted rows are still being walked on every scan. See Slow scans and Tombstone compaction. |
OpsPerSecond |
Comparable across shards. | One shard far above its peers is a hot shard - the exact condition adaptive splitting exists to relieve. See Concurrent split activity. |
Reads / Writes |
The raw counters OpsPerSecond is derived from, over HotnessWindow: (Reads + Writes) / HotnessWindow.TotalSeconds. |
A read-heavy shard and a write-heavy shard need different remedies; the split between the two counters tells you which you have. |
HotnessWindow |
The window the counters cover: the time since the shard activated, so it restarts when the shard deactivates. Positive on every shard that answered the fan-out. | Exactly TimeSpan.Zero marks the placeholder entry of a shard whose diagnostics call failed (OpsPerSecond then reads 0.0); see the traps. A very short window means the shard activated recently, so its counters and OpsPerSecond cover only that span. |
SplitInProgress |
false on a stable tree. |
true means this shard is the source of an in-flight slot migration: a split (adaptive, or driven by an online reshard that grows the tree), or a fold that hands this shard's slots to an adjacent shard (an online reshard that shrinks the tree, or automatic shard healing). Normal if transient; see Concurrent split activity. |
BulkOperationPending |
false on a stable tree. |
true means the shard has recorded a bulk-load graft it has not finished linking in: normal while a chunk of an append-based bulk load grafts, and cleared by the shard's next read or write if the graft was interrupted. While any shard reports it, autonomic splitting is suspended for the whole tree. See Bulk loading. |
SampleFailed |
false on every shard. |
true marks the placeholder entry of a shard whose diagnostics call failed: its counts are unmeasured, not zero, and the tree-administration facade's streamed bulk load (ILatticeTreeAdmin.BeginBulkLoadAsync) refuses to begin until every shard answers. See the traps. |
A worked reading
A tree with a hot shard mid-split, and a second shard that needs compaction:
tree=orders shards=4/4096 live=812433 tombstones=196022 deep=True sampledAt=2025-...
shard 0: depth=3 live=201110 tombstones=1204 ratio=0.6% ops/s=48.2 split=False bulk=False
shard 1: depth=3 live=198740 tombstones=1190 ratio=0.6% ops/s=51.7 split=False bulk=False
shard 2: depth=4 live=210301 tombstones=192455 ratio=47.8% ops/s=44.9 split=False bulk=False
shard 3: depth=3 live=202282 tombstones=1173 ratio=0.6% ops/s=502.4 split=True bulk=False
Read it in this order:
LiveKeysis even across every shard. Key distribution is fine, so whatever is wrong is not a hashing problem.- Shard 3 carries roughly ten times its peers'
OpsPerSecond. That is a hot shard: even load by key count, very uneven load by request rate. ItsSplitInProgressistrue, so the autonomic splitter has already noticed and is acting. The split is not inRecentSplitsyet: a split is recorded there only when it finalises, after the flag clears. Nothing to do unless the flag stays set - go to Concurrent split activity. - Shard 2 has a
TombstoneRatioof 47.8 percent while its peers sit under one percent. Nearly half of what a scan of that shard walks is deleted rows. That is the compaction signal - go to Slow scans. - Shard 2's
Depthis one greater than its peers', which is consistent with the tombstone bloat rather than a separate problem: the shard is holding more physical entries than its peers for the same live-key count.
Traps when reading a report
These are the report behaviours that most often lead to a wrong conclusion.
A shallow report always reports zero tombstones. The shallow path never asks leaves for tombstone counts, so
TombstonesandTombstoneRatiocome back0(andTotalTombstoneswith them) regardless of what is on disk. Checkreport.Deepbefore believing a zero. Onlydeep: trueproduces tombstone figures.An all-zero shard entry can mean the fan-out failed. When a shard's diagnostics call throws, the aggregator logs a warning (
Diagnostics fan-out failed for shard {ShardIndex} in tree {TreeId}) and substitutes an entry carrying only the shard index andSampleFailed = true; every other field is its default. A genuinely empty shard also reportsDepth = 0andLiveKeys = 0, but itsSampleFailedisfalseand itsHotnessWindowis positive, because a shard that answers always reports the time since it activated. An entry withSampleFailedset is therefore the placeholder for a shard that did not answer, and the silo log carries the exception. If one shard reads as empty on a tree you know holds data, checkSampleFailedand the log before concluding the data is gone.Reports are cached per mode. Shallow and deep results are cached independently for
DiagnosticsCacheTtl(default 5 s), so a shallow poll never refreshes the deep report and vice versa.SampledAttells you how old the report actually is. To make a report unconditionally fresh during an investigation, set the TTL to zero for that tree:siloBuilder.ConfigureLattice("orders", options => { options.DiagnosticsCacheTtl = TimeSpan.Zero; });A zero TTL means every call fans out to every shard. Use it for triage, not for a steady-state dashboard poll.
RecentSplitsis activation state, not history. It is a bounded ring buffer (32 entries) on the per-tree stats grain. It is emptied if that grain deactivates, and it is trimmed once 32 splits have accumulated. An emptyRecentSplitsdoes not prove no split happened; theorleans.lattice.shard.splits_committedcounter in Metrics is the record that survives a deactivation.A split commit invalidates both cached reports. Recording a split clears the shallow and deep caches, so the first report after the split is recorded is freshly fanned out. The split coordinator sends that record best-effort and does not wait for it, so if it is lost the cached report simply lives out its TTL (see Diagnostics).
What the report does not tell you
DiagnoseAsync is a structural and hotness snapshot. It carries no storage
bytes, no latency percentiles, and no cache hit ratio. For those:
| Question | Where to look |
|---|---|
| How many bytes is this tree holding? | ILattice.GetStorageUsageAsync; see Tree storage. |
Is orleans.lattice.storage.leaf_state_bytes / storage.snapshot_bytes really zero, or just unmeasured? |
orleans.lattice.storage.usage_deep_published: no series means the tree is unobserved, 0 means only the WAL-only poller has run so those gauges report no data, 1 means a deep publish ran and a zero is a real zero. See Tree storage. |
| How slow are reads and writes? | The orleans.lattice.get.duration / set.duration histograms in Metrics. |
| Is the read cache helping? | orleans.lattice.cache.hits and orleans.lattice.cache.misses. |
| Is the WAL backing up? | WAL saturation signal and WAL tuning. |
| Is compaction keeping up? | orleans.lattice.compaction.*; see Tombstone compaction. |
Storage-provider exceptions on write
Symptom
A write fails with an exception thrown by a storage provider rather than by
Lattice: the WAL provider's append when the mutation's WAL row is too large, or
the Orleans grain-storage provider's WriteStateAsync when a grain-state row
is. The failure is usually reproducible for a particular key or leaf and
unaffected by retry.
Likely cause
Lattice persists a tree across several storage rows, and each one is bounded independently by the provider's per-row or per-blob limit:
- The WAL row, written once per mutation. Its size grows with the key and value you wrote, plus causal metadata. On the Azure Table WAL provider the whole encoded entry is stored in one binary property, which Azure Table caps at 64 KiB.
- The leaf snapshot blob, capturing every entry a leaf holds - tombstones
included, until compaction reaps them. Its size grows
with the entries the leaf holds, which are bounded by that tree's pinned
MaxLeafKeysand byLatticeOptions.MaxLeafBytes(default 64 MiB). A payload larger thanLeafSnapshotSegmentBytes(default 4 MiB) is written as row-aligned segments of at most that size, so a single snapshot row exceeds the segment size only for an indivisible entry larger than it. - The leaf state row, which no longer scales with
MaxLeafKeys.
An oversized single value pushes the WAL row over the limit; a snapshot
segment larger than the provider's per-row limit pushes a snapshot row over
it. Tree storage
carries the per-provider limit table, the row-size formulas, and the sizing
arithmetic for choosing MaxLeafKeys against a given provider.
This is not:
- It is not
LatticeQuotaExceededException. That is Lattice's own opt-in admission control (LatticeOptions.MaxLiveKeys/MaxEstimatedBytes, bothnullby default) refusing a write because the tree hit a configured ceiling, and it carriesTreeId,Dimension,Current, andLimitso you can act on it without parsing a message. - It is not Orleans's
InconsistentStateException, which signals an etag conflict - a concurrent writer to the same state row - not a size problem. An atomic write reports that conflict as aLatticeStateWriteFailedExceptionwithConflictset instead (see below), and is safe to retry with the same operation id.
How to confirm
Read the provider exception itself. It names the limit it enforced. On the ordinary write path Lattice does not translate a provider size failure into a Lattice exception type, so the provider's own error is the primary evidence. An atomic write is the exception: when the atomic-write saga or the cross-tree coordinator fails to persist its own state with a fault raised by a storage provider, the caller receives
LatticeStateWriteFailedExceptioninstead, because the provider's exception type need not be loadable on the client (a fault of a type every client can load, such asTimeoutException, propagates unchanged). Its message andFaultTypesummarise the provider fault,GrainTypeandGrainKeyname the grain whose write failed, andConflictisfalsefor a failure that is not an optimistic-concurrency conflict. See Atomic writes.Take a storage-usage report and compare the surfaces against the provider's limit from Tree storage:
var usage = await tree.GetStorageUsageAsync(cancellationToken); Console.WriteLine( $"tree={usage.TreeId} wal={usage.WalRetainedBytes} snapshot={usage.SnapshotBytes} " + $"leafState={usage.LeafStateBytes} total={usage.TotalBytes} partial={usage.Partial}");Partialset totruemeans at least one surface could not be sampled, so the totals are a floor rather than an exact figure.Check the silo log for the leaf snapshot warning. A snapshot capture driven by the activation advisory is best-effort: it is caught and logged (
Proactive snapshot capture for leaf {GrainId} failed; will retry on next periodic recheck or reactivation.) rather than surfaced to the caller. A snapshot that is permanently too large to write therefore shows up as a repeating warning and no snapshot coverage, not as a failed request.
How to fix
Bound what callers can write, at the edge. Both guards are opt-in and both default to
null; onSetAsync,SetIfVersionAsync,GetOrSetAsync,SetManyAsync,SetManyWherePredicateAsync, the single-tree and cross-tree atomic batches (checked before anything is staged) and the CRDT delta paths each throws anArgumentExceptionbefore the write reaches storage, which is a far better failure than a provider error deep in the persistence path. The bulk-load paths andMergeAsyncdo not check them:siloBuilder.ConfigureLattice("orders", options => { options.MaxKeyLength = 512; options.MaxValueSizeBytes = 256 * 1024; });Keep large payloads out of the tree. Store the blob in blob storage and put its identifier in the tree. This is the only fix that scales - a value large enough to threaten a WAL row will threaten the next provider too.
Lower the tree's
MaxLeafKeysso each snapshot blob covers fewer entries.MaxLeafKeysis not aLatticeOptionsproperty: it is pinned per tree in the registry (defaulting to 128) and changed only throughILattice.ResizeAsync. See Tree sizing for the resize procedure and Tree storage for how to pick the value.Lower
LeafSnapshotSegmentBytes(default 4 MiB, floor 64 KiB) below the grain-storage provider's per-row limit, so every snapshot row fits whateverMaxLeafKeysis. Set it on the silo-wide options: the snapshot storage grain does not see a per-tree override. See Tree storage.Move the WAL to a higher-capacity backend. The WAL has its own storage seam (
IWalStorageProvider), so it can be pointed at a backend with a larger per-row limit independently of the grain-storage provider the rest of the tree uses; see WAL storage providers. Note this does not help the snapshot blob: leaf snapshots are persisted through the same named grain-storage provider as the rest of the tree, so the levers there areLeafSnapshotSegmentBytes,MaxLeafKeys,MaxLeafBytes, the value sizes you write, and swapping that provider.Admission control caps total growth, not row size.
MaxLiveKeysandMaxEstimatedBytesmake the tree refuse the write calls that check them -SetAsync,SetIfVersionAsync,GetOrSetAsync,SetManyAsync,SetManyWherePredicateAsync, the single-tree and cross-tree atomic batches,ApplyCrdtDeltaAsyncandApplyCrdtDeltaManyAsync- with a typed, actionableLatticeQuotaExceededExceptiononce the whole tree reaches a ceiling, and the non-enforcingAdmissionAdvisoryLiveKeys/AdmissionAdvisoryBytesdry-run ceilings help you size them; see Configuration. They bound the tree's total footprint, not any single row, and the bulk-load paths andMergeAsyncdo not check them, so they complement the fixes above rather than replace them.
Concurrent split activity
Symptom
One or more shards report SplitInProgress = true. Latency on the affected
shard is elevated, and RecentSplits shows entries appearing regularly.
Likely cause
SplitInProgress means the shard is the source of an in-flight adaptive
split: Lattice has detected a hot shard and is moving part of its virtual-shard
range to a new physical shard. An online reshard (ILattice.ReshardAsync)
that grows the tree drives the same per-shard split, so while one runs the
flag and RecentSplits also move on the shards it divides, hot or not. A
fold - an online reshard that shrinks the tree, or automatic shard healing -
sets the same flag on the shard whose slots it is handing to an adjacent
shard, but is never recorded in RecentSplits;
orleans.lattice.shard.consolidations_committed counts folds. The autonomic splitter watches
per-shard throughput and triggers when a shard's observed operations per second exceed
HotShardOpsPerSecondThreshold (default 200). That figure is computed as
(reads + writes) / window.TotalSeconds - the same quantity the report
surfaces as OpsPerSecond, so the report shows you exactly what the splitter
is reacting to. AutoSplitEnabled defaults to true.
BulkOperationPending is the analogous flag for a pending bulk graft. An
append-based bulk load records each chunk's graft on the
shard before linking it in and clears it once the graft completes, so the flag
is normally set only while a chunk is grafting; an interrupted graft is
finished by the next read or write that reaches the shard.
A split in progress is normal operation, not a fault. Callers do not see topology exceptions during one: routing staleness is caught and retried inside Lattice, so a read or write that races the topology change is retried against the new owner transparently. See Shard splitting for the phase-by-phase description of what the split actually does.
How to confirm
Poll the flags and correlate them against split history:
var report = await tree.DiagnoseAsync(deep: false, cancellationToken);
foreach (var shard in report.Shards.Where(s => s.SplitInProgress || s.BulkOperationPending))
{
Console.WriteLine(
$"shard {shard.ShardIndex}: split={shard.SplitInProgress} " +
$"bulk={shard.BulkOperationPending} ops/s={shard.OpsPerSecond:F1}");
}
var totalOps = report.Shards.Sum(s => s.OpsPerSecond);
var hottest = report.Shards.OrderByDescending(s => s.OpsPerSecond).First();
var share = totalOps > 0 ? hottest.OpsPerSecond / totalOps : 0;
Console.WriteLine($"hottest shard {hottest.ShardIndex} carries {share:P0} of observed ops/s");
Then decide which case you are in:
| Observation | Reading |
|---|---|
Flag set, clears within a few report intervals, RecentSplits gains one entry |
Normal. The split committed. |
Flag set, clears, ShardCount one lower, RecentSplits unchanged |
Normal. A fold committed; orleans.lattice.shard.consolidations_committed counts it. |
| Flag set on several shards at once | Also normal if it is bounded: MaxConcurrentAutoSplits (default 2) caps in-flight autonomic splits per tree, MaxClusterConcurrentAutoSplits (default null, disabled) adds a cluster-wide ceiling on top of it, MaxConcurrentMigrations (default 4) bounds the splits or folds an online reshard runs at once, and MaxConcurrentShardConsolidations (default 1) bounds the folds automatic shard healing runs on a tree. |
Flag set on the same shard across many reports, no new RecentSplits entry, no throughput recovery |
Stuck. Treat as a fault. |
| Flag never set even though one shard is obviously hot | The candidate is being suppressed. |
For the last two cases, the metrics tell you which: orleans.lattice.split.in_flight
shows how many of the tree's shards carry the flag on each monitor pass that
polls the shards (a pass held off by AutoSplitEnabled, by the minimum tree
age, or by an in-flight resize, reshard, merge or snapshot records nothing) - the
donor of an in-flight healing fold included, so a fold occupies one of the
MaxConcurrentAutoSplits slots too; orleans.lattice.split.candidates_suppressed
counts hot, eligible shards a monitor pass found but could not start, because
the per-tree cap (MaxConcurrentAutoSplits) had fewer free slots than
candidates or the cluster-wide gate (MaxClusterConcurrentAutoSplits) withheld
a slot; orleans.lattice.split.admission.deferred counts hot shards the
admission policy held back, by reason: cluster_cap (the cluster-wide
gate), uniform_load (the whole tree is hot - typically a bulk ingest - so a
split would relieve nothing; governed by HotShardMinSkewRatio),
low_occupancy (too few live entries to redistribute; HotShardMinShardEntries),
or shard_ceiling (the tree's physical shard ceiling; MaxPhysicalShardsPerTree);
and orleans.lattice.shard.splits_committed counts the splits that completed.
A pass that starts with the per-tree cap already fully occupied evaluates no
candidates at all, so while split.in_flight sits at MaxConcurrentAutoSplits
a hot shard waiting its turn is counted on neither counter. Nor is a shard held
off by the minimum tree age, by the per-shard cooldown, or because it owns
fewer than two virtual slots, or any shard while a pass is suspended outright
because a resize, reshard, merge or snapshot is in flight or a shard holds a
pending bulk graft. See Metrics.
How to fix
- A transient flag needs no action. Let it complete.
- Splits never triggering on an obviously hot shard: check the suppression
rules in Shard splitting. The common causes are
AutoSplitMinTreeAge(default 60 s) holding off splits on a young tree,HotShardSplitCooldown(default 2 minutes) rate-limiting repeat splits on the same shard, andAutoSplitEnabledhaving been turned off. The admission policy can also hold a hot shard back - read thereasononorleans.lattice.split.admission.deferred:uniform_loadmeans the whole tree is hot, so splitting would not help. - Splits triggering too eagerly on a bursty workload: raise
HotShardOpsPerSecondThreshold. The rate the splitter compares against it is averaged over the shard's whole activation (the sameHotnessWindowthe report shows), not over one sampling interval, so a short burst barely moves it on a long-lived shard but dominates it on a recently activated one. LengtheningHotShardSampleInterval(default 30 s) only makes the monitor poll less often; it does not change the window the rate is averaged over. - The split itself is too disruptive: lower
SplitDrainBatchSize(default 1024) to make each drain step smaller, at the cost of a longer overall split. - Uneven
LiveKeysneeds no fix. Splitting redistributes virtual slots to relieve request load, and each split itself leaves the source shard and its new sibling holding about half the keys of an unsplit peer. Placement hashes the whole key, so key design cannot concentrate keys on one shard: aLiveKeyscolumn that is uneven in proportion to slot ownership is the footprint of past splits.
Slow scans
Symptom
A range scan or full enumeration takes much longer than the key count suggests it should, or its latency degrades over time on a tree whose live-key count is flat.
Likely cause
Scan cost is dominated by:
- Tombstone bloat. A deleted key leaves a tombstone that a scan still
walks. A shard at 50 percent
TombstoneRatiodoes twice the work per live result. This is the classic case of a scan getting slower whileTotalLiveKeysstays flat. - Shard fan-out. Keys are routed to shards by hash (a virtual slot derived
from
XxHash32of the key), so a scan fans out to every physical shard no matter how narrow the range you ask for. The scan's wall-clock is therefore bounded by its slowest shard - one hot or bloated shard slows every scan of the tree. - Leaf-chain walk depth. Within a shard, a scan walks the leaf chain one leaf at a time. More entries per shard means more leaves to hop.
- Page size and round trips.
KeysPageSize(default 512) sets how many keys each shard returns per page; a small page size on a large scan multiplies round trips.
How to confirm
- Take a deep report and read
TombstoneRatioper shard. This is the fastest discriminator: a high ratio on the shards you scan is the answer. Remember that a shallow report reports zero tombstones unconditionally. - Watch
orleans.lattice.leaf.scan.durationto see whether the time is going into per-leaf work, andorleans.lattice.leaf.tombstone.ratiofor the distribution of per-leaf ratios within each tree (the histogram is tagged by tree, not by leaf, and is sampled only when a compaction pass visits a leaf - by default once perTombstoneGracePeriod, or on demand throughCompactShardAsync- so it can trail a deep report by up to that period). See Metrics. - Compare per-shard figures in the report. Because every scan fans out to
every shard, the slowest shard sets the pace. Look for the shard whose
TombstoneRatioorOpsPerSecondis the outlier and treat that shard as the scan's bottleneck.
How to fix
Compact the bloated shards.
MinTombstoneRatioForCompaction(default0.0, meaning ratio-triggered compaction is off) andMaxLeafEntriesBeforeForcedCompaction(default0, off) are the policy triggers;CompactionTriggerCooldown(default 5 minutes) rate-limits them.TombstoneGracePeriod(default 24 hours) is how long a tombstone must age before it can be reaped. For a one-off, drive a shard directly:var accepted = await tree.CompactShardAsync(shardIndex: 2, cancellationToken); Console.WriteLine(accepted ? "compaction pass accepted" : "request declined (compaction disabled for this tree, or a pass already in flight)");See Tombstone compaction for the full policy and its telemetry.
Bound the range. Prefer the
startInclusive/endExclusiveoverloads over an unbounded enumeration. A bound does not reduce the number of shards visited - routing is by hash, so every shard is asked - but it cuts the work each shard does and keeps the per-scan dedup set the tree grain holds small, since that set grows with the number of distinct keys the scan has yielded.Use the resilient streaming API for scans.
ScanKeysAsyncandScanEntriesAsynctransparently reconnect and resume when an enumeration is aborted mid-flight, with a default budget of 8 consecutive reconnect attempts (overridable per call viamaxAttempts), replenished whenever the walk yields a record and bounded by 1024 reconnects in total. The rawILattice.KeysAsyncandEntriesAsyncstreams surface the abort instead, and because the tree grain is a stateless worker the abort rate rises with concurrency on the tree rather than with scan length, so prefer the resilient pair for scans of any length.Turn on prefetch for scans you will consume in full.
PrefetchKeysScanandPrefetchEntriesScanboth default tofalse; a per-callprefetch: trueargument overrides them for a single scan. Prefetch fetches each shard's next page in parallel while the current page is being consumed, hiding per-shard grain-call latency. Prefetched pages are held in memory until consumed, so a caller that aborts early (aTake(n), say) pays for pages it never reads.Raise
KeysPageSize(default 512) if you are paging a large result set and the round-trip count dominates.
If a scan does not just run slowly but fails, that is a different problem.
Strongly-consistent scans (CountAsync, CountPerShardAsync, KeysAsync,
EntriesAsync) reconcile against shard-map changes that land mid-scan, bounded
by MaxScanRetries (default 3); exhausting the budget throws an
InvalidOperationException whose message names the operation and tells you to
raise MaxScanRetries or reduce concurrent split activity. If you see it, read Concurrent split
activity first - the scan is a symptom of the
topology churn, not the cause. GetManyAsync spends the same budget when a
shard-map change or a concurrently committing atomic-write saga races its
batched read, then falls back to one bounded decision-gated read. Sustained saga
commits alone no longer invalidate every attempt after gate acquisition. An
Information-level log, GetManyAsync for tree {TreeId} entering bounded decision-gated fallback after {Attempts} optimistic attempts., records each
fallback entry. Frequent entries indicate commit contention; concurrent fallback
readers can still exhaust the bounded admission deadline. The hold briefly delays
new local saga decisions tree-wide, with a writer-open interval between read
holds; see Atomic writes for the latency bounds. A lost or expired gate, registry
coverage growth or a topology change during the fallback instead fails closed
with LatticeTransactionOutcomeUnavailableException. A multi-key read whose result depended on a pending atomic
write while the transaction registry could not be reached throws
LatticeTransactionOutcomeUnavailableException (a TimeoutException)
instead of either message: a transient condition, so retry after a back-off;
see Atomic writes.
See Consistency for the enumeration
guarantees.
Stale reads and cache behaviour
Symptom
A read returns a value you believe was already overwritten or deleted, or two reads issued close together disagree.
Likely cause
Lattice serves ExistsAsync and GetManyAsync - and any GetAsync the
shard root serves serially - through a per-silo read-through cache. With
OptimisticShardRootPointReads
on (the default), a GetAsync whose optimistic read validates reads the
primary leaf instead and never consults the cache. Whether the cache can
return a stale value is entirely determined by CacheTtl:
CacheTtl = TimeSpan.Zero(the default). Every read confirms freshness before answering. When the primary leaf is activated on the same silo and its revision has not moved since the cache last refreshed, that local check is enough; otherwise the cache performs a delta refresh against the primary. The delivery-cursor comparison behind that refresh is cheap, and either way the default configuration does not serve stale values.CacheTtlset to a non-zero value. When the primary leaf is on another silo, the cache may answer from its local dictionary without contacting the primary for up to that interval. This is the trade you opted into: lower read latency, staleness bounded by the TTL. A same-silo primary whose revision has moved is still refreshed immediately.
So on a default-configured tree, a surprising read is almost never the read cache. See Caching for the refresh protocol and Consistency for the guarantees each read path gives.
How to confirm
Compare a cacheable read against a read that cannot be served from cache.
GetWithVersionAsync bypasses the cache deliberately, because compare-and-swap
callers need the authoritative version:
var cached = await tree.GetAsync("orders/42", cancellationToken);
var authoritative = await tree.GetWithVersionAsync("orders/42", cancellationToken);
Console.WriteLine($"cached-path bytes: {cached?.Length ?? -1}");
Console.WriteLine($"authoritative bytes: {authoritative.Value?.Length ?? -1}");
- They agree. The cache is not involved; the value really is what the tree holds. Look at the writer instead.
- They disagree and
CacheTtlis non-zero. Expected staleness, bounded by the TTL you configured. - They disagree and
CacheTtlisTimeSpan.Zero. That is not ordinary cache staleness. Capture both results and treat it as a consistency issue.
Secondary checks:
orleans.lattice.cache.hitsandorleans.lattice.cache.missesin Metrics tell you whether the cache is answering at all.- If you have set
MaxCacheValueBytes, the cache evicts value payloads only - least recently used first, once the payload bytes it holds for a leaf exceed the budget - while each row's metadata envelope stays resident; a read landing on an evicted payload transparently fetches from the primary, and a single-keyGetAsynccounts it as a miss while aGetManyAsyncbatch leaves it out of both counters. That costs an RPC but cannot return a stale value.
How to fix
Set
CacheTtltoTimeSpan.Zerofor a tree whose reads must always reflect the latest committed write:siloBuilder.ConfigureLattice("orders", options => { options.CacheTtl = TimeSpan.Zero; });Use
GetWithVersionAsyncfor read-modify-write. It bypasses the cache and returns the version a conditional write needs. Never build a compare-and-swap on top ofGetAsync.Do not confuse the two caches.
CacheTtlgoverns value reads;DiagnosticsCacheTtl(default 5 s) governsDiagnoseAsyncreports only. A stale report is a diagnostics-cache artefact and says nothing about read freshness - which is exactly why a caller that needs an authoritative live count should useCountAsyncrather than readingTotalLiveKeysout of a possibly-cached report.After a resize or reshard, no cache flush is needed. A resize rebuilds the tree into a new physical tree with different leaf grain identities, so reads land on fresh cache activations. A reshard that grows the tree moves virtual slots onto new physical shards, so moved keys likewise read through new leaves and their fresh caches; one that shrinks it folds a shard's keys into an adjacent shard's existing leaves, whose caches pick the moved keys up on their next refresh like any other write. Keys that stay put keep reading through the same leaves, whose caches keep refreshing against them. See Tree sizing and Online reshard.
WAL reclamation and cold replay loops
Symptom
These signals point at the write-ahead-log recovery path rather than at ordinary scan or cache behaviour:
- Silo startup logs
Lattice grain-storage fencing check: the 'lattice' grain storage provider accepted a write carrying a stale ETag...or, inRejectmode (the default), silo start fails with anOrleansConfigurationExceptioncontaining that text. - WAL-retained bytes stay high, or a tree's WAL looks wedged, even when write load is low.
- A leaf logs
SELF-REINFORCING COLD REPLAY LOOP: leaf ..., ororleans.lattice.leaf.activation.cold_replay_loopadvances.
Likely cause
These are different faults with different remedies:
- The grain-storage fencing warning means the provider registered under
LatticeOptions.StorageProviderNameaccepted a write carrying a stale ETag. Lattice writes some grain state directly through that provider and relies on stale-ETag writes being rejected; without that, an older checkpoint can overwrite a newer one while the WAL pin keeps the newer offset, so later WAL reclamation can trim entries a rebuild still needs.LatticeGrainStorageFencingOptions.Modedefaults toReject(earlier releases defaulted toWarn):Rejectthrows from silo startup only when the probe proves the provider is unfenced, andWarnlogs the same finding and lets the silo start. A timeout, missing provider, or transient probe fault isInconclusiveand warns even inRejectmode. - A wedged WAL floor is not the same as a large or growing WAL. The WAL reclamation read names the durable materialiser pin holding the tree's floor.
TreeWalReclamationReport.IsWedgedis true only when the floor holder carries a usable pin offset (PinOffset >= 0) while the leaf's persisted checkpoint for that WAL partition is still-1(TreeWalFloorHolderState.NeverCheckpointed). A holder at offset-1with the same state is the benign never-checkpointed sentinel and can clear when the leaf checkpoints. - The cold-replay-loop warning means one leaf has crossed the consecutive-cancellation threshold with no successful activation in between. The warning's three counters are the diagnosis:
cancelled mid-replaymeans replay started but did not bank enough progress,queued for a replay permitmeans replay-permit admission is saturated, andresolving tree optionsmeans activation never reached the replay gate and was serialized behind a shared dependency.
How to confirm
- For startup fencing, read the exact log line. A healthy provider logs
Verdict=Fenced: the provider rejected a write carrying a stale ETag.An unfenced provider logs theaccepted a write carrying a stale ETagmessage; inRejectmode the same message is thrown asOrleansConfigurationException. The disabled mode logs that the probe will not run. - For WAL reclamation, call the tree-admin WAL reclamation read. In-process callers use
ILatticeWalReclamation.GetWalReclamationAsync(treeId), gRPC callers useGetWalReclamation, and agents use the MCP toollattice_treeadmin_wal_reclamation. ReadPinStoreReadable,PinCount,PinsWithoutOffset,FloorHolder.ConsumerId,FloorHolder.LeafId,FloorHolder.Partition,FloorHolder.PinOffset,FloorHolder.PersistedCheckpoint,FloorHolder.State, andIsWedged. If the pin store is unreadable, the report proves no health claim. - For cold replay, read the warning rather than collapsing it into one saturation bucket. The text deliberately says
READ THE SPLIT BY ARM: a high options-resolving share is a dependency-serialization problem, a high queued-for-permit share is replay-gate pressure, and a high mid-replay share is an overlong replay or missing replay progress banking.
How to fix
- Use a grain-storage provider that enforces ETags, such as Orleans memory, Azure Table, Azure Blob, Cosmos DB or ADO.NET storage. The default
Rejectmode fails silo start on an unfenced provider; if you need the silo to start while you replace the provider, setLatticeGrainStorageFencingOptions.ModetoWarnfor the rollout (throughConfigureLatticeGrainStorageFencing) and return it toRejectonce startup should fail closed again. Do not disable the probe except for a deliberately accepted compatibility gap. - For a wedged WAL floor, use the WAL reclamation report as the diagnostic record: it tells you which materialiser pin, leaf and WAL partition hold the floor, and whether the condition is a stranded pin rather than an idle tree. Do not treat a flat retained-WAL graph alone as proof that reclamation works or is broken.
- For a cold-replay loop, remediate the arm the warning names. Back off workload or raise replay-admission headroom for queued-for-permit pressure; investigate shared option / registry resolution if activations cancel before requesting a permit; and reduce replay work or improve snapshot coverage when cancellations happen mid-replay. Retrying the same activation without changing the named cause reproduces the loop.
Repeated row-loss exceptions during compaction
Symptom
Compaction repeatedly logs, for the same leaf IDs, a lost-leaf-row fault (an
exception implementing ILatticeLeafUnavailable) with the warning that the
leaf refused to compact; recorded as skipped and its dirty mark retained above the pass watermark, so the next pass re-nominates it. The
runtime exception counter can rise even while the routed tree remains readable.
Likely cause
A rowless leaf without a create intent is refused, not recreated empty. That refusal can identify a missing routed state row, but it can also come from a stale maintenance reference to a leaf that was already removed from routing and cleared. Older compaction code retained that reference above its pass watermark on every failure; successful retirement did not remove the dirty nomination. The result was recurring work against an unrouted leaf. See the investigation and fix in PR #4927.
How to confirm
Correlate complete logs by leaf ID, caller and time interval, then compare those IDs with authoritative current routing and preserved storage evidence. A dirty nomination alone is not proof that a leaf is still routed. An exception counter counts runtime exception occurrences, not unique missing rows: propagation and retries can contribute several occurrences for one failed call. Missing early logs or labels remain an attribution gap, not evidence of zero faults. Current absence from routing does not prove the history of the leaf's removal or that no data was lost earlier.
How to fix
The fix removes dirty nominations when a leaf clear succeeds. For existing stale nominations, compaction discards only the maintenance hint after a complete, bounded traversal of fresh current routing proves the rowless leaf unreachable. It does not restore, clear or admit that leaf. A routed leaf, changed topology, exhausted traversal budget or routing/storage fault retains the nomination and existing failure behavior; do not bypass the rowless admission guard.
If the missing leaf is routed, or routing cannot be established, preserve storage, snapshots and WAL before attempting recovery. Investigate the provider and historical removal evidence; upgrading this maintenance fix is not a repair of missing routed data. Do not infer a healthy deployment from a falling aggregate counter or from a sampled routing snapshot alone.
Acknowledged deletes reappear after cold replay
Symptom
A single-key DeleteAsync succeeded and reads confirmed the key absent before
shutdown, but after cold WAL replay both point and multi-read APIs return its
older payload and version. This can affect nonzero shards whose delete records
were written by older producers. A newer acknowledged set can legitimately
recreate the same key, so a live value alone is not proof of this defect.
Likely cause
Older single-key delete producers persisted tombstones with ShardIndex = 0
even when the owning shard was nonzero. Without an authoritative shard map,
replay cannot distinguish that malformed record from a legitimate shard-0
delete and may reject it while still banking coverage of its offset. See the
acknowledged-delete reproduction in
#4928.
The producer and committed replay-watermark fixes in #4929 protect new writes and expose recovered tombstones to delta readers. They do not repair historical records or tombstones already rejected and covered by a snapshot. An authoritative map present before replay can route a retained old record; adding a map after consumption and restarting alone is not a repair. #4930 tracks the evidence-preserving historical assessment and recovery procedure below.
How to confirm and recover
Preserve evidence before starting diagnostic grain calls or activation. Assess offline first; do not apply the general "take a diagnostic report first" advice to a pristine copy in this incident. This is not an automatic migration. A successful startup, a new-write test, or matching digests of two already-corrupted projections is not recovery evidence.
Preserve before assessing
Quiesce writers, replication and background maintenance under the deployment's approved incident procedure, then take a storage-provider-consistent copy of all grain storage, leaf snapshots, every retained WAL partition and registry state. Include placement/provider configuration, tree aliases, shard maps and their history, transaction outcomes, retention/trim positions, and application acknowledgement/audit records. A filesystem copy of a running database is not a consistent backup; use its supported backup/export mechanism or a stopped store. Record the deployed binaries/revision and UTC capture boundary. Hash and retain the originals, inventory and logs read-only; keep a second copy for analysis. Do not activate the pristine copy: activation can bank new checkpoints/snapshots.
Use a separate cluster id, storage namespace, snapshot store and WAL location for each working copy. Block outbound replication and application traffic, disable trimming/compaction on the working host before it starts, and bound its CPU, memory and run duration. Never connect it to the original provider or let it join the original cluster. Read-only assessment uses provider exports and offline decoders, not grain activation. This procedure does not authorize restarting a live deployment or changing its retention.
On the isolated host, set the default (unnamed) LatticeOptions.WalGcInterval
to TimeSpan.Zero before startup to disable the core WAL GC scheduler, and
set TombstoneGracePeriod to Timeout.InfiniteTimeSpan globally and in any
applicable per-tree options to disable tombstone compaction. See
WAL GC configuration and
compaction disabling.
WalGcInterval does not disable manual ILatticeWalGc.RunOnceAsync calls or
replication's independent maintenance driver: do not register replication on
the working host, and do not invoke manual collection/compaction. Verify the
effective options before activation; do not assume a longer interval disables
maintenance.
Inventory and classify
Inventory every tree that could have received single-key deletes from the old producer, including implicit/no-map trees and system trees. Read the retained WAL directly from the analysis copy, not a filtered leaf replay or a live-only export: those can already omit the evidence. Examine all partitions, paginating to the recorded head and recording gaps and trimmed prefixes. A WAL partition number is not a shard index.
For each single-key Delete with ShardIndex = 0, record tree/physical alias
identity, exact key, partition/offset, original HLC, tombstone/value flags,
origin/vector metadata and transaction status. Correlate it with successful
delete acknowledgements, prior sets and every later mutation of that key.
Preserve source bytes and hashes alongside the decoded ledger. The candidate
set is a suspicion list, not a list of keys to delete. A valid shard-0 delete has
exactly the same shape; a newer set can legitimately recreate a deleted key.
Do not include prepared writes until their committed outcome is established.
For each candidate, record these independent findings:
| Finding | Required evidence |
|---|---|
| Intended deletion | A committed tombstone and acknowledgement/audit provenance tied to the exact tree/key/operation, or an independently verified authoritative application history. A missing current value alone is not proof. |
| Ownership | Authoritative routing/topology and its applicable version, including migrations, key ranges and moved-away slots. Validate its applicability to the proposed replay, not just its existence. A prior set's shard stamp or today's default hash alone does not prove historical ownership. |
| Replay coverage | Per-partition leaf checkpoint and snapshot coverage relative to the candidate offset, plus retained WAL boundaries. Coverage means scanned, not necessarily applied. A scalar checkpoint from another partition is not evidence. |
| Final expected state | Complete later mutation/transaction history through a chosen cutover boundary, including overwrites, recreation, expiry and compaction. Preserve original causal metadata; do not interpret a later set as resurrection without comparing it. |
Classify the result explicitly:
| Assessment | Action |
|---|---|
| Proven legitimate shard-0 record | No historical correction. Retain as an isolation control. |
| Proven nonzero-owner delete, retained and not covered by the replay baseline | Trial replay only on an isolated copy with verified authoritative routing present before first activation. Verify the exact delete outcome and other shards. |
| Proven delete already covered by a snapshot/checkpoint, or routing installed only after consumption | Do not treat map publication/restart as repair. Restore a verified correct backup or rebuild into a fresh destination from complete evidence, below. |
| Missing/ambiguous acknowledgement, ownership, transaction outcome or later history; trimmed required evidence | Mark unknown/unrecoverable from available evidence and stop correction for that scope. Do not guess, broadcast a delete, or silently omit an unknown key from the replacement. Obtain independent authoritative history or leave the scope quarantined. |
No suspect records in the retained suffix does not certify an unaffected tree: malformed records may have been consumed and trimmed. If the complete affected time window is unavailable, report that assessment as incomplete. Likewise, a backup captured from an already-resurrected projection is not a known-good backup, even when its artifact checksums pass.
Restore or rebuild a separate destination
Choose a recovery boundary, fence subsequent writes and account for all acknowledged operations up to it. Do not silently discard operations after a backup's capture point. Agree the scope and expected final key/value/version inventory with the incident reviewer before building anything.
Restore: select a backup chain whose contents are independently proven
correct for the affected keys. Use the backup package's
ILatticeBackupRestoreService.RestoreAsync with an explicit, fresh
LatticeRestoreRequest.TargetTreeId on the isolated host; verify the manifest
chain and artifact digests. Never leave the target implicit (it defaults to the
captured source tree). See the restore pipeline
and cold disaster restore.
Catch up only from complete, verified post-backup evidence. In-place merge
onto a corrupted existing tree is not replacement: the absence of a key in a
backup does not remove an existing value. A pre-delete backup without its
subsequent deletion history is also insufficient. The backup restore API rejects
reserved system-tree targets and enforces source/target authorization. If the
scope is unsupported or denied, stop and obtain a separately reviewed supported
reconstruction path; do not bypass those guards.
Rebuild: if no correct backup exists, construct a fresh isolated destination
from a complete verified baseline and subsequent committed history. Where the
original retained WAL is complete, a new projection may replay the unchanged
records with authoritative routing in place before activation. Where it is not,
use an independently complete application history/export with an explicitly
reviewed reconstruction of final state. Preserve original HLCs, tombstones,
versions, origin, expiry and transaction semantics through the causal-preserving
restore/merge seams, not ordinary SetAsync/DeleteAsync calls which create new
timestamps. If the required baseline, routing or history cannot be provided,
there is no supported lossless rebuild from the available evidence.
Do not reset checkpoints or discard snapshots, including on the source used as evidence. Do not edit any retained WAL stamp. A fresh destination has its own new state and checkpoints; it is not the old store with its coverage erased. Do not install a guessed default map to make replay pass. Existing rebuild-on- fall-off policies, view reconciliation and replication re-seed are not repair oracles: they cannot recreate a tombstone the source already rejected.
Verify, then separately approve cutover
Keep a per-key expected-versus-actual report tied to the preserved evidence. Prove deleted keys absent through point, versioned and multi-read APIs; inspect retained tombstones through the delta/backup surface as well. A missing live value is insufficient if the tombstone is absent and an older replica can reintroduce it. Verify legitimate later recreations with their newer original version, surviving payload hashes and all unrelated shard controls. Compare a complete expected inventory, not merely equality between two recovered trees.
Stop and reopen only the isolated destination, then repeat those assertions over its new durable snapshots and WAL. Verify source hashes and coverage did not change during the experiment. Any missing evidence, wrong causal metadata, unknown key or mismatched control blocks cutover; keep the originals and failed working copies for review.
Cutover is a separate authorized incident action, not part of assessment: publish only the verified destination, with correct tenant/access/schema/view configuration and routing, while writes remain fenced. Do not reconnect old replicas until their state and tombstone retention have been reconciled against the verified history. Retain the previous destination and evidence for rollback; switching back restores the prior defect too and is not a recovery claim.
The bounded executable proof is
BPlusLeafGrainTests.HistoricalDeleteRecovery.cs. It first reproduces a
nonzero-shard legacy delete being skipped and banked in a real snapshot by the
leaf replay path; reactivation with a late map still returns the old value.
A separate fresh rebuild with the map installed first retains the original
tombstone/HLC, preserves sibling and foreign-shard isolation, and survives
snapshot rehydration. Its second case preserves a legitimate newer recreation.
Run it together with the retained-record and encoded-producer controls:
dotnet test test/lattice/Orleans.Lattice.Tests.csproj -c Release --filter "FullyQualifiedName~Historical_delete_recovery|FullyQualifiedName~Cold_replay_of_legacy_zero_stamped_delete|FullyQualifiedName~Cold_replay_of_encoded_acknowledged_writes"
These are synthetic single-partition unit proofs using the real leaf replay/snapshot codec, not a certification of any historical deployment or an end-to-end backup restore. Each incident still needs the evidence inventory, complete causal reconstruction and isolated provider-specific verification above. No automatic ownership inference or historical migration is supplied.
Symptom index
| Symptom | Section |
|---|---|
Provider exception from a WAL append or WriteStateAsync |
Storage-provider exceptions on write |
LatticeQuotaExceededException on write |
Storage-provider exceptions on write (admission control, not a provider limit) |
LatticeStateWriteFailedException from an atomic write |
Storage-provider exceptions on write - FaultType names the provider fault; with Conflict set, retry with the same operation id |
| Repeating "Proactive snapshot capture ... failed" warning | Storage-provider exceptions on write |
Lattice grain-storage fencing check warns, or silo start fails on stale ETag acceptance |
WAL reclamation and cold replay loops - the grain-storage provider registered for Lattice accepted a stale-ETag write; use a provider that enforces ETags, or set LatticeGrainStorageFencingOptions.Mode deliberately during rollout |
| One shard far hotter than its peers | Concurrent split activity |
SplitInProgress stuck on for a long time |
Concurrent split activity |
BulkOperationPending stuck on |
Concurrent split activity and Bulk loading |
| Scan latency climbing while live keys stay flat | Slow scans |
InvalidOperationException naming MaxScanRetries |
Slow scans, then Concurrent split activity |
LatticeTransactionOutcomeUnavailableException on a read |
Atomic writes - the transaction registry was unreachable for a prepared key, or the bounded GetManyAsync fallback lost its gate/topology/registry-coverage certification: transient, retry after a back-off |
LatticeSaturatedException on a read or write |
WAL saturation signal - back-pressure, not a fault: back off and retry. SaturationSource names the seam that refused, and the source tag on orleans.lattice.saturation.refusals counts refusals by seam; a replay_permit_admission refusal also carries an arm tag naming which part of the replay admission check refused |
WAL retained bytes stay high, or lattice_treeadmin_wal_reclamation reports IsWedged |
WAL reclamation and cold replay loops - read the floor holder, pin offset, persisted checkpoint and state before concluding whether the tree is idle or stranded |
SELF-REINFORCING COLD REPLAY LOOP warning, or orleans.lattice.leaf.activation.cold_replay_loop advances |
WAL reclamation and cold replay loops - read the warning split by arm: mid-replay, queued-for-permit, and resolving-options have different remedies |
LatticeTreeOwnershipDeniedException from an alias change |
Ownership-bounded aliasing - the registered ITreeOwnershipGuard refused the alias before anything was written; Reason carries the guard's explanation |
Leaf Error that it cannot advance its durable projection checkpoint, or LeafProjectionStaleException |
A live leaf whose projection has gone stale - data at risk: capture a backup before the activation is recycled |
| Repeated lost-leaf-row faults from compaction on the same IDs | Repeated row-loss exceptions during compaction - distinguish stale unrouted nominations from missing routed state |
High TombstoneRatio |
Slow scans and Tombstone compaction |
| Read returns an overwritten value | Stale reads and cache behaviour |
| A previously acknowledged delete reappears after cold replay | Acknowledged deletes reappear after cold replay - preserve pristine storage, snapshots, WAL and acknowledgement evidence before recovery |
| One shard reports all zeros on a tree that holds data | Traps when reading a report |
| Report is older than expected | Traps when reading a report |
Depth growing across shards |
Tree sizing |
See also
- Diagnostics - the field-by-field definition of
TreeDiagnosticReportandShardDiagnosticReport. - Metrics - the full instrument catalog behind every metric named here.
- Configuration - every
LatticeOptionsmember, with defaults and tuning guidance. - Tree storage - per-provider size limits and the row-size arithmetic.
- Tree sizing - choosing and changing
MaxLeafKeys. - Shard splitting - the split protocol, suppression rules, and tunables.
- Tombstone compaction - compaction policy, operator API, and telemetry.
- Caching - the read-through cache and its refresh protocol.
- Consistency - the guarantees each read and scan path gives.