fix(io): allow goosefs:/// URLs to use site.properties - #9364
Merged
zhangyue19921010 merged 4 commits intoSep 18, 2026
Merged
zhangyue19921010 merged 4 commits into
zhangyue19921010 merged 4 commits into
Conversation
Stop requiring a URL host when resolving the GooseFS master so OpenDAL can still load addresses from goosefs-site.properties.
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)) |
Collaborator
There was a problem hiding this comment.
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.
Collaborator
|
@XuQianJin-Stars Nice catch here. Could the test cases be further streamlined and simplified? |
Fold the overlapping hostless URL, prefix, and storage-option tests into two parametrized tables so the site.properties regression stays unique.
calculate_object_store_prefix is public and cannot link to resolve_master_addr under -D rustdoc::private-intra-doc-links.
Contributor
There was a problem hiding this comment.
✅ 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.
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.
Summary
master_addrwhen it is unset sogoosefs:///pathcan load masters fromgoosefs-site.properties.Test plan
goosefs:///path extraction, master resolution, and cache prefixnew_storesucceeds withgoosefs:///pathplusgoosefs_master_addrnew_storesucceeds withgoosefs:///pathplus a tempgoosefs-site.propertiescargo test -p lance-io --features goosefs --lib object_store::providers::goosefs