Skip to content

fix: strip prefix from get_opts result in MaybePrefixedStore#745

Open
blinkybool wants to merge 1 commit into
developmentseed:mainfrom
blinkybool:strip-prefix-get-opts
Open

fix: strip prefix from get_opts result in MaybePrefixedStore#745
blinkybool wants to merge 1 commit into
developmentseed:mainfrom
blinkybool:strip-prefix-get-opts

Conversation

@blinkybool

@blinkybool blinkybool commented Jul 3, 2026

Copy link
Copy Markdown

Fixes #744.

MaybePrefixedStore::get_opts returned an ObjectMeta whose location still carried the store prefix, unlike list/list_with_delimiter (which strip_meta). Since 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.

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 run repro. Happy to add a regression test if you'd like one.


🤖 Investigated and drafted with Claude Code; reviewed by me.

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>
@blinkybool blinkybool changed the title Strip prefix from get_opts result in MaybePrefixedStore fix: strip prefix from get_opts result in MaybePrefixedStore Jul 3, 2026
@blinkybool
blinkybool force-pushed the strip-prefix-get-opts branch from 7ca15ef to 0647821 Compare July 3, 2026 12:48
@ds-release-bot ds-release-bot Bot added the fix label Jul 3, 2026
@kylebarron

Copy link
Copy Markdown
Member

Could you add a test for this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

open_reader double-applies a store prefix=

2 participants