fix: strip prefix from get_opts result in MaybePrefixedStore#745
Open
blinkybool wants to merge 1 commit into
Open
fix: strip prefix from get_opts result in MaybePrefixedStore#745blinkybool wants to merge 1 commit into
get_opts result in MaybePrefixedStore#745blinkybool wants to merge 1 commit into
Conversation
MaybePrefixedStore::get_opts returned an ObjectMeta whose location still carried the store prefix, unlike list/list_with_delimiter which strip it. Because head delegates to get_opts, and the buffered reader (open_reader) issues its follow-up range read against the returned meta.location, reads on a store with a prefix= resolved at prefix/prefix/key and 404'd. Mirror object_store's own fix (apache/arrow-rs-object-store#686) by stripping the prefix from the returned meta. Fixes developmentseed#744 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
get_opts result in MaybePrefixedStoreget_opts result in MaybePrefixedStore
blinkybool
force-pushed
the
strip-prefix-get-opts
branch
from
July 3, 2026 12:48
7ca15ef to
0647821
Compare
Member
|
Could you add a test for this please? |
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.
Fixes #744.
MaybePrefixedStore::get_optsreturned anObjectMetawhoselocationstill carried the store prefix, unlikelist/list_with_delimiter(whichstrip_meta). Sinceheaddelegates toget_opts, and the buffered reader (open_reader) issues its follow-up range read against the returnedmeta.location, reads on a store with aprefix=resolved atprefix/prefix/keyand 404'd.This mirrors object_store's own fix for the same issue in its
PrefixStore(apache/arrow-rs-object-store#686) — the copy vendored here predates it.Kept to the one-line fix to match the crate's current lack of tests; #744 has a standalone
uv runrepro. Happy to add a regression test if you'd like one.🤖 Investigated and drafted with Claude Code; reviewed by me.