Files
lancedb/docs/web/enterprise/distributed-real-time-read.mdx
T
Jack YeandClaude Sonnet 5 5e38120bdc docs: add storage integration SDK examples, abstract RTE write, simplify cache pages (#4865)
## Summary

- **Define Storage Integration**: un-gates the Python (and Rust, for S3)
`create_storage_integration` examples, drafted against #4618 and held
back until it shipped -- it's now in v0.42.0-beta.0+, and the signature
matches the drafts exactly.
- **Naming rules**: drops the `Branch` row and its "Learn more" link,
consistent with de-emphasizing branches elsewhere in this nav.
- **Distributed RTE Write**: removes the REST path, the
`__lance_mem_wal` index name, and "WAL node" terminology in favor of an
abstract framing -- a query node routes writes to RTE nodes, each of
which can host shards from many different tables. Both diagram variants
are updated to match.
- **Data Page Cache / Tiered Index Cache / Cache Prewarm**: drop
Helm-specific and exact-percentage detail (disk-budget math,
`startup_prewarm_block_query_ready`/`healthPort`/failure-policy table)
in favor of a short feature → architecture → why-it-matters shape, each
closing with a contact-sales pointer. Data Page Cache's on-demand
prewarm section is removed outright.

## Note

I wasn't able to get a clean visual render of the updated Distributed
RTE Write diagram in local preview -- Mermaid isn't rendering in
headless Chrome in this environment for *any* page right now, confirmed
against an unmodified reference page showing the identical symptom. The
diagram source follows the exact pattern already shipped and working in
the 21 diagrams from the earlier brand-theming pass, and `mint
validate`/`mint broken-links` both pass clean.

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-05 01:40:54 -08:00

212 lines
8.6 KiB
Plaintext

---
title: "Distributed RTE Read"
sidebarTitle: "Distributed RTE Read"
description: "How a query combines the real time engine's fresh tier with the ordinary distributed query-serving path, machine to machine."
icon: "network-wired"
availability:
embedded: unavailable
enterprise: available
---
[RTE Read](/search/realtime-read) covers what a query against an
RTE-enabled table returns: base-table rows merged with the fresh tier,
fresh rows superseding base rows with the same primary key. On a single
Embedded process that merge is one function call against one Lance
dataset. In LanceDB Enterprise, the base table and the fresh tier are
usually served by different machines -- plan executors for the base table,
an [RTE node](/tables/realtime-engine#wal-nodes) for the table's shards --
so a query has to combine their results across the network instead.
<div className="hidden dark:block">
```mermaid
%%{init: {"theme": "base", "themeVariables": {
"background": "#171513", "primaryColor": "#1e1b19", "primaryTextColor": "#f4ebe8",
"primaryBorderColor": "#4c443f", "lineColor": "#847770", "textColor": "#f4ebe8",
"clusterBkg": "#211d1a", "clusterBorder": "#4c443f", "edgeLabelBackground": "#171513",
"fontFamily": "Inter, sans-serif", "fontSize": "18px"
}}}%%
flowchart LR
Q["Query node<br/>plans the query"]
subgraph PE["Plan executors"]
direction TB
B1["Base-table arm<br/>index-covered scan or ANN search"]
end
subgraph WN["RTE node (owns this table's shards)"]
direction TB
W1["SSTable arm<br/>index-covered"]
W2["Active memtable arm<br/>vector: in-memory HNSW*<br/>FTS/scalar: indexed"]
end
U["Union exec<br/>PK-keyed last-write-wins dedup,<br/>top-K cut on distance"]
Q --> B1
Q --> W1
Q --> W2
B1 --> U
W1 --> U
W2 --> U
U --> R["Merged result"]
classDef default fill:#1e1b19,stroke:#4c443f,stroke-width:1px,color:#f4ebe8
classDef accent fill:#2a1810,stroke:#e8582d,stroke-width:1.5px,color:#f4ebe8
class U accent
```
</div>
<div className="block dark:hidden">
```mermaid
%%{init: {"theme": "base", "themeVariables": {
"background": "#ffffff", "primaryColor": "#ffffff", "primaryTextColor": "#221d19",
"primaryBorderColor": "#ad9e95", "lineColor": "#6b625c", "textColor": "#221d19",
"clusterBkg": "#f4ebe8", "clusterBorder": "#ad9e95", "edgeLabelBackground": "#ffffff",
"fontFamily": "Inter, sans-serif", "fontSize": "18px"
}}}%%
flowchart LR
Q["Query node<br/>plans the query"]
subgraph PE["Plan executors"]
direction TB
B1["Base-table arm<br/>index-covered scan or ANN search"]
end
subgraph WN["RTE node (owns this table's shards)"]
direction TB
W1["SSTable arm<br/>index-covered"]
W2["Active memtable arm<br/>vector: in-memory HNSW*<br/>FTS/scalar: indexed"]
end
U["Union exec<br/>PK-keyed last-write-wins dedup,<br/>top-K cut on distance"]
Q --> B1
Q --> W1
Q --> W2
B1 --> U
W1 --> U
W2 --> U
U --> R["Merged result"]
classDef default fill:#ffffff,stroke:#ad9e95,stroke-width:1px,color:#221d19
classDef accent fill:#fff1ec,stroke:#e8582d,stroke-width:1.5px,color:#221d19
class U accent
```
</div>
## An extra exec node, not a parallel system {#union-exec}
The distributed plan for an RTE-enabled table is an ordinary plan executor
query plan with one additional node spliced in: a union exec that queries
the owning RTE node's shard and merges its rows into the base arm's stream
by primary key, keeping the newest generation on a collision and cutting
back to the requested top-K once both sides have contributed. An optimizer
pass inserts this node only when the query actually touches an RTE-enabled
table; a query that touches none produces a plan identical to one with no
RTE tables involved at all, so RTE adds no overhead to queries that never
use it.
Because the base arm already read through the plan-executor fleet's ordinary
caches and index structures, the only new network hop this adds is the one
to the RTE node that owns the table's shards -- the same RTE node [Real Time
writes](/ingestion/realtime-write) land on, found by the query node through
the same consistent hash of database and table name.
## Search stays index-covered {#index-coverage}
Every tier the union exec reads from -- the base table, the RTE node's
SSTables, and its currently-active memtable -- is covered by a maintained
index, for vector, full-text, and scalar search alike:
| Layer | Vector search | Full-text / scalar search |
| --- | --- | --- |
| Base table | ANN index | Maintained index |
| SSTables | ANN index | Maintained index |
| Active memtable | In-memory HNSW graph\* | Maintained index |
<div className="hidden dark:block">
```mermaid
%%{init: {"theme": "base", "themeVariables": {
"background": "#171513", "primaryColor": "#1e1b19", "primaryTextColor": "#f4ebe8",
"primaryBorderColor": "#4c443f", "lineColor": "#847770", "textColor": "#f4ebe8",
"edgeLabelBackground": "#171513", "fontFamily": "Inter, sans-serif", "fontSize": "18px"
}}}%%
flowchart LR
B["Base table"] --> I1["Vector, full-text, and<br/>scalar index coverage"]
S["SSTables"] --> I1
M["Active memtable"] --> I2["Full-text and scalar index<br/>coverage; vector via<br/>in-memory HNSW*"]
I1 --> R["No unindexed data<br/>left to scan in full"]
I2 --> R
classDef default fill:#1e1b19,stroke:#4c443f,stroke-width:1px,color:#f4ebe8
classDef accent fill:#2a1810,stroke:#e8582d,stroke-width:1.5px,color:#f4ebe8
class R accent
```
</div>
<div className="block dark:hidden">
```mermaid
%%{init: {"theme": "base", "themeVariables": {
"background": "#ffffff", "primaryColor": "#ffffff", "primaryTextColor": "#221d19",
"primaryBorderColor": "#ad9e95", "lineColor": "#6b625c", "textColor": "#221d19",
"edgeLabelBackground": "#ffffff", "fontFamily": "Inter, sans-serif", "fontSize": "18px"
}}}%%
flowchart LR
B["Base table"] --> I1["Vector, full-text, and<br/>scalar index coverage"]
S["SSTables"] --> I1
M["Active memtable"] --> I2["Full-text and scalar index<br/>coverage; vector via<br/>in-memory HNSW*"]
I1 --> R["No unindexed data<br/>left to scan in full"]
I2 --> R
classDef default fill:#ffffff,stroke:#ad9e95,stroke-width:1px,color:#221d19
classDef accent fill:#fff1ec,stroke:#e8582d,stroke-width:1.5px,color:#221d19
class R accent
```
</div>
For full-text and scalar search, a maintained index covers every tier the
union exec reads from -- the base table, the RTE node's SSTables, and its
currently-active memtable -- so a row written a moment ago is just as
index-searchable as one written yesterday. If a resident memtable predates
an index being added to the maintained set, the query is rejected outright
rather than silently missing that memtable's rows; there is no code path
that quietly returns an incomplete result.
Vector (ANN) search follows the same rule for the base table and SSTables.
The active memtable's rows are ANN-searchable too: it builds its own
in-memory HNSW graph as rows land, so writes stay vector-searchable within
milliseconds without waiting for a freeze into an SSTable. \* That graph
search steps aside for a full scan of the memtable only when it can't
honor the query correctly through a graph: a prefilter predicate (graph
traversal can't apply an arbitrary filter first), a primary-key override
that could let a stale near vector occupy a top-K slot a newer row should
have, a distance lower bound (only a full scan can exclude the nearest
rows before the top-K cut), or before the memtable has any index yet on a
cold start. Outside those cases, every committed row -- base table,
SSTables, and the active memtable alike -- is covered by a real index,
with no sliver of unindexed data left to scan in full.
Both guarantees depend on the table's RTE write spec actually maintaining
the index in question -- by default every index is maintained, but a
deployment that pins a smaller set with `with_maintained_indexes` loses the
guarantee for whatever it leaves out, and a query against an unmaintained
index is rejected the same way, rather than silently searching the base
table alone.
## What to read next {#next}
<CardGroup cols={2}>
<Card title="RTE Read" icon="magnifying-glass" href="/search/realtime-read">
What a query returns, and how Embedded does this same merge in-process.
</Card>
<Card title="Distributed RTE Write" icon="bolt" href="/enterprise/distributed-real-time-write">
How writes reach the RTE node this page's queries read from.
</Card>
<Card title="Distributed Search" icon="network-wired" href="/enterprise/distributed-search">
The ordinary plan-executor path this layers on top of.
</Card>
</CardGroup>