Repository navigation
Fix INSERT into OneLake DataLakeCatalog table (route ADLS Gen2 writes to the .dfs host) - #110290
Conversation
|
Workflow [PR], commit [ba7ebb2] Summary: ✅
AI ReviewSummaryThis PR fixes the OneLake Final Verdict
|
|
📊 Cloud Performance Report ✅ AI verdict: This PR only changes the OneLake/Azure DataLake write path (DFS host retargeting, request-time remote_url_allow_hosts enforcement) plus its unit/integration tests — none of which any ClickBench SELECT executes. Both flagged queries (Q4 and Q15) show a -18.1% "improvement," but each median lands inside master's current variance band and CPU time is essentially flat (Q4 2682.7→2652.0 ms, Q15 2595.2→2606.1 ms), so there is no work-backed speedup. The deterministic envelope suppression to no_change is correct: these are run-to-run variance, not effects of this change. No cross-query pattern and no real regression or improvement to act on. clickbench🟢 No significant changes tpch_adapted_1_official🟢 No significant changes Debug info
|
… to the .dfs host) INSERT into a Microsoft Fabric / OneLake `DataLakeCatalog` table failed during the data-file upload with `IncorrectEndpointError` (HTTP 400): OneLake reads use the Blob endpoint, so the ADLS Gen2 (DFS) write client built the file URL against the `.blob` host, which does not serve the DFS filesystem API. - Route DFS writes to the `.dfs` host in `buildAdlsGen2FileUrl` (reads stay on `.blob`), matching only real Fabric hosts at a domain-label boundary; same in `isAdlsGen2Endpoint`. - Validate the actual request host against `remote_url_allow_hosts` in `PocoAzureHTTPClient`, normalized (scheme + lower-cased host) to match CREATE-time validation, so a `.dfs` write cannot bypass an allowlist. - Document in the `onelake_use_blob_endpoint` setting that hardened deployments must allowlist both the `.blob` and `.dfs` hosts. - Add gtests for the URL rewrite and the allowlist re-check. Co-Authored-By: Claude Opus 4.8 <[email protected]>
d368d82 to
ba7ebb2
Compare
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 89/89 (100.00%) · Uncovered code |
Fix INSERT into OneLake DataLakeCatalog table (route ADLS Gen2 writes to the .dfs host)
Since ClickHouse#110290 every request of `PocoAzureHTTPClient` is checked against `remote_url_allow_hosts`, including the requests of Azure disks, so a server whose Azure disk endpoint is not in the list fails to start (ClickHouse#124431). S3 disks are not checked; only their redirects are. Skip the request-host check for disk clients; redirects are still checked. Let data lake tables on an Azure disk skip the URL check, as S3 disks do. Keep the disk flag on the client returned by `CreateBlobContainer`, which the SDK builds without `ClickhouseOptions`: otherwise the node that created the container rebuilds its disk client as a non-disk one on the next config reload, or on the first query of a data lake table on that disk. A disk created by `disk(...)` in a query still has its endpoint checked, once when it is created (not when it is loaded from existing metadata), so the exemption does not reach hosts a query could not. Closes ClickHouse#124431 Co-Authored-By: Claude Opus 5.5 <[email protected]>
INSERT into a Microsoft Fabric / OneLake
DataLakeCatalogtable failed during the data-file upload withIncorrectEndpointError(HTTP 400): OneLake reads use the Blob endpoint, so the ADLS Gen2 (DFS) write client built the file URL against the.blobhost, which does not serve the DFS filesystem API..dfshost inbuildAdlsGen2FileUrl(reads stay on.blob), matching only real Fabric hosts at a domain-label boundary — same tightening inisAdlsGen2Endpoint.remote_url_allow_hostsinPocoAzureHTTPClient, so a.dfswrite can't bypass an allowlist that only lists the.blobread host.test_insert_into_table[onelake](internal pipeline only) now asserts the INSERT commits and reads back a real value.Note for hardened deployments: OneLake reads use
onelake.blob.fabric.microsoft.comand writes useonelake.dfs.fabric.microsoft.com. If host access is restricted viaremote_url_allow_hosts, both hosts must be allowlisted — otherwiseCREATE/reads succeed butINSERTis rejected withUNACCEPTABLE_URL. This is documented in theonelake_use_blob_endpointsetting description. (Not validated atCREATEtime on purpose, so read-only deployments that only need the.blobhost are not regressed.)Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed
INSERTinto a Microsoft Fabric / OneLakeDataLakeCatalogtable failing withIncorrectEndpointError(HTTP 400) by routing ADLS Gen2 (DFS) writes to the.dfsendpoint host instead of the.blobhost. Note: withremote_url_allow_hosts, both the.blob(read) and.dfs(write) Fabric hosts must be allowlisted forINSERT.Documentation entry for user-facing changes
🤖 Generated with Claude Code
Version info
26.7.1.1226(included in26.7and later)