Repository navigation
fix(remote): preserve blob snapshot identity across credential refresh - #5216
Merged
Merged
Conversation
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.
Descriptor-opened direct Blob handles lost the resolver identity in their refresh context, so a credential-expiry retry could accept a replacement table at the same version. Reuse the acquired identity and cover proactive URL expiry, provider expiry earlier than advertised TTL, single-shot re-resolution, renewal identity mismatch, and renewal auth rejection. Log proactive/reactive refresh reasons and resolver identity for native acceptance.
Xuanwo
force-pushed
the
xuanwo/blob-refresh-expiry-m2
branch
from
November 25, 2026 20:30
76fe117 to
98facbe
Compare
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The refresh context now keeps the identity acquired when the descriptor was opened, closing the same-version snapshot substitution gap. Renewal rejects mismatched provenance before fetching refreshed object bytes, while preserving the existing retry and proxy fallback behavior.
BubbleCal
approved these changes
Nov 25, 2026
Xuanwo
added a commit
that referenced
this pull request
Nov 30, 2026
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.
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.
What
Fix the refresh path for direct Blob handles opened from a SQL
blob_descriptor.open_blob_fileacquired the resolver's immutable snapshot identity, but thePresignedBlobRangeRequesterusedblob_locations_context_for_source, which only copied the table handle'sexpected_query_snapshot. For an ordinary table handle that isNone, so a provider credential expiry and refresh could establish a different identity at the same numeric version. The refreshed handle could then accept replacement-table bytes.The refresh context now carries the identity acquired by the first resolver response, matching the whole-read, range-read and
fetch_blob_filespaths.Coverage
Adds five focused tests through the normal
open_blob_fileentrypoint:expires_at, object store returns 403);403propagates as an auth failure.Existing
direct_blob_file_refreshes_expired_url_oncecovered only reactive refresh with no advertised expiry.Signer contract
The SDK treats object-store
401/403as expiry and refreshes once. If the resolver signs the refreshed URL with still-expired provider credentials, the second object GET fails and the SDK fails closed. Signers should return anexpires_atno later than the underlying credential expiry and use renewed credentials on re-resolution.Validation
cargo test -p lancedb --quiet --features remote --lib remote::table::blobs::tests: 70 passed.cargo check -p lancedb --quiet --features remote --tests: run before the final test pass.