---
title: "Materialised view options - Configuration"
url: "https://nsta1.github.io/Orleans.Lattice/docs/lattice/configuration/materialised-view-options.html"
source: "https://github.com/NSTA1/Orleans.Lattice/blob/release/9.9/docs/lattice/configuration.md?plain=1#L2030-L2073"
package: "Orleans.Lattice"
version: "9.9.0"
documents: "Orleans.Lattice 9.9.0 (release line 9.9)"
built: "2026-10-04"
all-pages: "https://nsta1.github.io/Orleans.Lattice/llms.txt"
bundle: "https://nsta1.github.io/Orleans.Lattice/docs/lattice/llms-full.txt"
---
# Materialised view options

Part of [Configuration](../configuration.md).

Materialised views are configured per view name on a separate options type,
`LatticeViewOptions`, not on `LatticeOptions`. Set a per-view override with
`ConfigureLatticeView(viewName, ...)`. There is no no-name overload: each view
resolves its options by its view name, so a default for every view goes through
the standard options API as `siloBuilder.Services.ConfigureAll<LatticeViewOptions>(...)`
(a plain `Configure<LatticeViewOptions>(...)` reaches only the unnamed instance):

```csharp verify
siloBuilder.ConfigureLatticeView("adults", options =>
{
    options.BatchSize = 512;
    options.CoalesceWindow = TimeSpan.FromMilliseconds(100);
});
```

| Option | Default | Meaning |
|--------|---------|---------|
| `BatchSize` | 256 | Maximum WAL entries read from each source partition per drain pass. Must be positive. |
| `CoalesceWindow` | 50 ms | Period of the background drain timer. Must be greater than zero and at most `0xFFFFFFFE` milliseconds (about 49.7 days), the longest period a grain timer accepts. |
| `SourceIdentityBackstopInterval` | 30 s | Safety-net interval after which the maintainer re-resolves its source tree's physical identity from the registry when no alias-change notification has arrived. In steady state the source binding is event-driven, so this backstop only covers a missed push. Must be greater than zero. |
| `AggregationFanout` | 1 | Aggregation views only: shards each group's accumulator into this many sub-accumulators hashed on the source key, merged at read. Must be at least 1. |
| `AggregationMaxGroupEntries` | 0 | Aggregation views only: when greater than zero, bounds each `Min` / `Max` / `SetUnion` group shard (approximate mode). 0 keeps every group exact. Must not be negative. |
| `MaxStagedTransactions` | 1024 | Maximum in-flight atomic-write transactions buffered before the backstop forces a rebuild. Must be at least 1. |
| `MaxStagedBytes` | 64 MiB | Maximum buffered prepared-entry payload before the backstop forces a rebuild. Must be at least 1. |
| `ReadHandleCacheTtl` | 1 s | How long an `ILatticeView` handle caches the resolved live view tree id. Bounds the post-swap read-staleness window. Must be greater than zero. |
| `OldGenerationReclaimGrace` | 5 s | How long a swapped-out view tree is retained before reclamation. Must exceed `ReadHandleCacheTtl`. |
| `CrossTreeReadinessTimeout` | 5 s | Cross-tree atomic visibility only: how long a completed cross-tree batch waits for every present participant view before degrading to per-tree atomicity. Must be greater than zero. |
| `ReplicationMode` | `DeriveLocally` | How the view tree is made available across clusters. `ShipView` requires the replication package. |
| `ShipViewProducerClusterId` | `null` | Required only when `ShipView` replicates both source and view trees. The stable, case-sensitive replication cluster id of the single producer. When set it must be non-empty and `ReplicationMode` must be `ShipView` (enforced by the options validator); the replication topology guards also reject a value on a view whose source tree is not replicated. |
| `MaxLagBudget` | 0 | Maximum committed-but-unapplied source entries before the view is force-evicted (WAL unpinned and rebuilt). 0 disables eviction. Must not be negative. |
| `LagEvictionCooldown` | 30 s | Minimum interval between two lag-budget evictions of the same view. Has no effect when `MaxLagBudget` is 0. |
| `ObeySourceBackpressure` | `true` | Whether the maintainer throttles its own drain when the source tree's WAL is under saturation back-pressure (smaller batch + deferred ticks). The maintainer reads the signal under the source tree id the view was declared with, while the signal is sampled under the id of the write-ahead log the source's writes land in, so on an aliased source tree (after a resize, a shadow-cutover restore, a schema remediation or an operator-set alias) it never sees back-pressure and drains at full rate (see [Resolution and scope](../wal-saturation-signal.md#resolution-and-scope)). Set to `false` to always drain at full rate. |
| `ThrottledBatchRatio` | 0.5 | Fraction of `BatchSize` drained per pass while the source is `Throttled`. Must be within `[0, 1]` (enforced by the options validator); the effective batch is clamped to `[1, BatchSize]`. |
| `ThrottledPauseMs` | 50 | Milliseconds background drain ticks are skipped after a pass that saw a `Throttled` source. `<= 0` disables the deferral. |
| `SaturatedBatchSize` | 16 | Drip-feed batch drained per pass while the source is `Saturated`. Must be at least 1 (enforced by the options validator); the effective batch is clamped to `BatchSize`. |
| `SaturatedPauseMs` | 500 | Milliseconds background drain ticks are skipped after a pass that saw a `Saturated` source. `<= 0` disables the deferral. |
| `HistoryHybridFullValueWindow` | 5 minutes | Durable history views under `HistoryRetentionMode.Hybrid` only: the maximum apply-time age of a revision for which full LWW value bytes are kept; an older revision (drained from a backlog or a catch-up replay) is shaped to metadata only. A non-positive value degrades hybrid to metadata-only. See [History views](../history-views.md). |

See [Materialised views](../materialised-views.md) for the full behaviour of each
option, including what registrations a view needs (`AddLattice` +
`AddLatticeViews`, the latter folding in `AddWalCursorRegistry`).

Previous: [Options Reference: WalMaterialiserPinBuckets to WalRetention](options-reference-5.md). Contents: [Configuration](../configuration.md).
