Skip to content

fix(io): allow goosefs:/// URLs to use site.properties - #9364

Merged
zhangyue19921010 merged 4 commits into
lance-format:mainfrom
XuQianJin-Stars:fix/goosefs-hostless-url-site-properties
Sep 18, 2026
Merged

zhangyue19921010 merged 4 commits into
lance-format:mainfrom
XuQianJin-Stars:fix/goosefs-hostless-url-site-properties

Conversation

@XuQianJin-Stars

Copy link
Copy Markdown
Contributor

Summary

  • Stop requiring a GooseFS URL host when resolving the master address.
  • Omit OpenDAL master_addr when it is unset so goosefs:///path can load masters from goosefs-site.properties.
  • Keep failing the store build only when no source supplies a master (env, site file, storage option, or URL authority).

Test plan

  • Unit tests for host-less goosefs:/// path extraction, master resolution, and cache prefix
  • new_store succeeds with goosefs:///path plus goosefs_master_addr
  • new_store succeeds with goosefs:///path plus a temp goosefs-site.properties
  • cargo test -p lance-io --features goosefs --lib object_store::providers::goosefs

Stop requiring a URL host when resolving the GooseFS master so OpenDAL
can still load addresses from goosefs-site.properties.
@github-actions github-actions Bot added A-encoding Encoding, IO, file reader/writer A-docs Documentation bug Something isn't working labels Sep 18, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 18, 2026
Comment on lines +512 to +520
let authority = if url.authority().is_empty() {
Self::resolve_master_addr(url, &opts).unwrap_or_default()
} else {
url.authority().to_string()
};
if root == "/" {
Ok(format!("{}${}", url.scheme(), url.authority()))
Ok(format!("{}${}", url.scheme(), authority))
} else {
Ok(format!("{}${}#{}", url.scheme(), url.authority(), root))
Ok(format!("{}${}#{}", url.scheme(), authority, root))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For hostless URLs, the cache prefix is derived differently from OpenDAL's actual master resolution.

The registry cache prefix used the raw URL authority whenever the URL
carried one, while new_store passes resolve_master_addr's result to
OpenDAL. When goosefs_master_addr / GOOSEFS_MASTER_ADDR overrides the
authority, two URLs sharing a placeholder authority but pointing at
different masters collided on one cached Operator.

Derive the prefix through the same resolve_master_addr chain for all
URLs so it always tracks the master the Operator actually uses; the
hostless site-properties case still collapses to the shared goosefs$
prefix.
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 18, 2026
@zhangyue19921010

Copy link
Copy Markdown
Collaborator

@XuQianJin-Stars Nice catch here. Could the test cases be further streamlined and simplified?

lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 18, 2026
Fold the overlapping hostless URL, prefix, and storage-option tests into
two parametrized tables so the site.properties regression stays unique.
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 18, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 18, 2026
calculate_object_store_prefix is public and cannot link to
resolve_master_addr under -D rustdoc::private-intra-doc-links.
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 18, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gate recommendation: approve.

The hostless URL change still delegates absent master resolution to OpenDAL while keeping cache keys aligned with Lance’s resolved master, and the focused tests cover explicit options and site properties. This documentation-only follow-up replaces the private rustdoc link without altering those semantics; the strict private-intra-doc-links build now passes.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 18, 2026

@zhangyue19921010 zhangyue19921010 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhangyue19921010
zhangyue19921010 merged commit 9b819b6 into lance-format:main Sep 18, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-docs Documentation A-encoding Encoding, IO, file reader/writer bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants