feat(remote): monotonic reads via x-lancedb-min-read-version watermark#3597
Merged
Conversation
There was a problem hiding this comment.
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.
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
force-pushed
the
jack/read-monotonic-version-watermark
branch
from
June 30, 2026 00:31
be952ca to
ed6b166
Compare
wjones127
approved these changes
Jun 30, 2026
| /// 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>, |
Contributor
There was a problem hiding this comment.
note: shame we can't re-use min_version.
brendanclement
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
RemoteTablehandle tracks the highest dataset version it has observed in a read response — surfaced by the server via a newx-lancedb-versionresponse header — and sends it back asx-lancedb-min-read-versionon 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-versionit is unaffected by WAL writes returning WAL entry ids. It is reset oncheckout_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-8integration branch to match the Enterprise submodule pin.