Skip to content

fix: initialize OpenDAL HTTP transport for static linking - #80

Open
zhangstar333 wants to merge 1 commit into
lance-format:mainfrom
zhangstar333:oss-opendal
Open

fix: initialize OpenDAL HTTP transport for static linking#80
zhangstar333 wants to merge 1 commit into
lance-format:mainfrom
zhangstar333:oss-opendal

Conversation

@zhangstar333

Copy link
Copy Markdown
Contributor

Explicitly install OpenDAL's default HTTP transport during Lance-C runtime initialization. Native static linking can omit OpenDAL's automatic constructor, causing OSS reads to fail with “default HTTP transport is not installed”.

Add a static C linking regression test covering ordinary and shared-session dataset opens against a local HTTP server.

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gate recommendation: approve.

The patch fixes the static-link regression introduced by the Lance 11/OpenDAL 0.58 upgrade: ordinary archive linking can discard OpenDAL’s constructor before OSS I/O begins. Initializing the documented, idempotent default from Lance C’s shared runtime addresses that root cause while preserving an already installed transport and the C ABI. Keeping this reachability inside Lance C is preferable to requiring every consumer to use whole-archive linker flags; the regression coverage exercises both ordinary and shared-session opens.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 10, 2026
zhangstar333 added a commit to zhangstar333/incubator-doris that referenced this pull request Sep 10, 2026
### What problem does this PR solve?

Related PR: lance-format/lance-c#80

Problem Summary: Native static linking can omit OpenDAL's automatic
constructor, causing OSS reads to fail because the default HTTP transport
is not installed. Include upstream commit
7fcd9c4ff7c03c10bdc9d8a600b3f7b0cf28a9ad after the existing Lance-C patch
chain. It explicitly installs the transport during runtime initialization
and adds static C linking regression coverage.

Rebase only the Cargo.toml and Cargo.lock patch context over the existing
foyer and object_store dependencies. Keep upstream code and test additions
unchanged and record the upstream source in the patch header.

### Release note

Include the Lance-C fix for missing OpenDAL HTTP transport initialization
when accessing OSS through a statically linked native executable.

### Check List (For Author)

- Test: Manual validation of archive MD5, clean full-chain zero-fuzz patch
  application, isolated downloader first and repeat runs, source-tree
  equality, bash syntax, Python AST, and unchanged upstream code additions.
  Script whitespace checks passed; imported patch whitespace is preserved.
  No Doris or Lance-C build or runtime tests were run.
- Behavior changed: Yes; initialize OpenDAL HTTP transport explicitly.
- Does this need documentation: No; bundled dependency fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant