Repository navigation
feat(remote): add presigned direct Blob V2 reads - #5210
Conversation
Resolve large Blob V2 values through the capability-gated /blob_locations route and read presigned URLs directly. Keep small ranges, inline values, old clusters, and resolver 503 fallbacks on the existing proxy path. Preserve pinned versions and query snapshot identity, translate physical offsets for shared Packed/Managed sidecars, validate Content-Range, and keep object-store traffic free of service credentials.
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Use enumerate for the proxy scatter loop and allow the internal schema fetch helper to carry both Blob capability flags.
Require a valid snapshot identity from the first blob_locations response and preserve it through refresh, proxy fallback, and oversized whole-value recovery. Reuse the caller's ReadSnapshot when capability refresh starts direct handle opening, and document the object-store network access Enterprise direct reads require.
There was a problem hiding this comment.
All three snapshot-consistency findings are fixed. Resolution and proxy recovery now preserve the original pinned state, missing provenance is rejected, and the client network requirements are documented.
Enabling direct reads still carries an integration risk: the candidate SDK/server combination lacks a verified real-QN acceptance run, and the 10 MiB cutoff remains provisional. Deployments can retain proxy behavior by omitting the capability until that validation is available.
Backport presigned Blob V2 reads for Python and TypeScript, including signed URL reuse, retries, parallel ranged GETs, and the inclusive 32 MiB threshold. Direct reads require the server to advertise support. The backport includes the snapshot identity check on credential refresh that the transport changes build on. Refs #5210, #5216, #5238, #5247, #5248.
What
Add a capability-gated client path for large Blob V2 reads over LanceDB Enterprise:
describeadvertisesx-lancedb-blob-locations: 1; the SDK then resolves pinned row locations throughPOST /v1/table/{id}/blob_locations/.fetch_blobs) and seekable handles (fetch_blob_files/open_blob_file) read presigned object-store URLs directly for eligible values and ranges at or above a provisional internal 10 MiB threshold.fetch_blob_rangesstay on the existing proxy path, including aggregate batches whose total exceeds the proxy byte limit.Packed/Managedsidecars translate logical ranges to physical offsets and validate the full numericContent-Rangetuple, not just its start or total.503falls back once to the proxy path using any version and identity already pinned; other resolver errors propagate. Object-store503s do not masquerade as resolver unavailability.ReadSnapshotif a later describe enables direct opening mid-operation.Client network requirement
On Enterprise clusters that enable direct Blob reads, large values and individual ranges may be fetched from short-lived object-store URLs instead of the LanceDB proxy. Clients then need network access to the object-store endpoint, including private endpoint routing, DNS, TLS trust and egress rules, in addition to the LanceDB endpoint. Small reads stay on the LanceDB proxy.
Why
Large Blob V2 reads currently stream every payload byte through
Object Store -> Plan Executor -> Query Node -> client. That consumes internal bandwidth, inflates PE/QN memory use and pollutes executor caches with low-locality.blobdata. This is the SDK half of ENT-4358; the server implementation is in Sophon.Compatibility
No public SDK signatures change. Old clusters omit the capability header and keep the existing proxy behaviour with zero extra round trips. The 10 MiB threshold is an internal prototype choice pending the paired acceptance measurement; it is not a public knob.
Validation
cargo check -p lancedb --quiet --features remote --testspasses.cargo test -p lancedb --quiet --features remote --lib remote::table::blobs::testspasses: 65 tests.503fallback with pinned state, no second resolver after fallback, object-store503not triggering proxy fallback, missing/mismatched resolver identity rejection, resolver identity preservation through refresh/proxy/oversized recovery, supplied-snapshot reuse on mid-operation capability refresh, and NULL/order/null-preserving paths.A real-QN acceptance run with the candidate SDK binary is separate and still pending deployment of the candidate server image.