Skip to content

feat(remote): monotonic reads via x-lancedb-min-read-version watermark#3597

Merged
jackye1995 merged 1 commit into
mainfrom
jack/read-monotonic-version-watermark
Jun 30, 2026
Merged

feat(remote): monotonic reads via x-lancedb-min-read-version watermark#3597
jackye1995 merged 1 commit into
mainfrom
jack/read-monotonic-version-watermark

Conversation

@jackye1995

Copy link
Copy Markdown
Contributor

Summary

Adds per-session monotonic reads for remote (LanceDB Cloud/Enterprise) tables, preventing successive reads on a handle from moving backward in dataset version when a load balancer routes them to query nodes with differently-cached views.

Each RemoteTable handle tracks the highest dataset version it has observed in a read response — surfaced by the server via a new x-lancedb-version response header — and sends it back as x-lancedb-min-read-version on subsequent reads (count_rows, query). A query node whose cache is behind that version refreshes before serving; a node already at/beyond it serves from cache at no extra cost.

The watermark is sourced only from reads (always committed dataset versions), so unlike the retired x-lancedb-min-version it is unaffected by WAL writes returning WAL entry ids. It is reset on checkout_latest(). Both headers are optional and ignored by older peers.

Server-side enforcement lives in LanceDB Enterprise. Targets the codex/update-lance-9-0-0-beta-8 integration branch to match the Enterprise submodule pin.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@github-actions github-actions Bot added enhancement New feature or request Rust Rust related issues labels Jun 30, 2026
Track the highest dataset version observed in read responses (a new
x-lancedb-version response header) per table handle and send it back as
x-lancedb-min-read-version on subsequent reads. A load-balanced query node
whose cache is behind that version refreshes before serving, so successive
reads on a handle never move backward in version even when the load balancer
routes them to different nodes.

Sourced only from reads (always committed dataset versions), so unlike the
retired min_version it is unaffected by WAL writes returning WAL entry ids.
@jackye1995
jackye1995 force-pushed the jack/read-monotonic-version-watermark branch from be952ca to ed6b166 Compare June 30, 2026 00:31
@jackye1995
jackye1995 changed the base branch from codex/update-lance-9-0-0-beta-8 to main June 30, 2026 00:31
/// balancer routes to. Sourced only from reads (always committed dataset
/// versions), never from writes (which may return WAL entry ids), so it is
/// unaffected by the WAL/version mismatch that retired `min_version`.
min_read_version: Option<u64>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: shame we can't re-use min_version.

@jackye1995
jackye1995 merged commit 0351b77 into main Jun 30, 2026
53 of 74 checks passed
@jackye1995
jackye1995 deleted the jack/read-monotonic-version-watermark branch June 30, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Rust Rust related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants