Skip to content

Backport #108674 to 26.4: Do not validate DataLakeCatalog auth_header or build catalog on ATTACH - #108894

Merged
alexey-milovidov merged 1 commit into
26.4from
backport/26.4/108674
Jun 30, 2026
Merged

alexey-milovidov merged 1 commit into
26.4from
backport/26.4/108674

Conversation

@robot-clickhouse

@robot-clickhouse robot-clickhouse commented Jun 30, 2026 •

Copy link
Copy Markdown
Member

Original pull-request #108674
Cherry-pick pull-request #108793

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.4.5.89

@robot-clickhouse robot-clickhouse added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default labels Jun 30, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [8daa9be]

Summary: ✅

@alexey-milovidov

Copy link
Copy Markdown
Member

Reviewed this last-step backport of #108674 to 26.4.

Faithful, intentionally smaller than the original. The master PR had two behavioral parts:

  1. Gate auth_header validation in registerDatabaseDataLake to CREATE only, so a database persisted with a malformed/forbidden header attaches at startup instead of throwing during ATTACH and blocking server start.
  2. Defer the eager catalog construction (network I/O) from the constructor to first use, plus the supporting plumbing in DatabaseDataLake.h (lazy_init ctor arg, catalog_mutex, mutable catalog_impl, initialize made const/TSA_REQUIRES).

On 26.4, DatabaseDataLake already builds the catalog lazily — the constructor only calls validateSettings, and catalog_impl is created on first access inside getCatalog. There is no eager initialize in the constructor here (that was a master-only change). So part 2 and its .h plumbing do not apply to 26.4 and are correctly omitted; the cherry-pick keeps exactly the two hunks that are relevant on this branch:

  • the !args.create_query.attach && !auth_header_str.empty() gate in registerDatabaseDataLake (the actual startup-block fix on 26.4), and
  • the http_forbid_headers enforcement in the RestCatalog constructor (so a persisted forbidden header is still rejected on the lazy first-use path).

The test files 04401_datalake_attach_does_not_block_startup.{sh,reference} are byte-identical to the merged master version.

CI: all builds (amd debug/asan_ubsan/tsan/release, arm release, darwin) and the completed parallel stateless shards are green; 04401 is parallel and passed there. 0 failures so far; the remaining integration shards and the sequential stateless shard are still running. MERGEABLE, no conflicts, no reviewer threads.

@alexey-milovidov

Copy link
Copy Markdown
Member

CI has now completed fully green: BackportPR status SUCCESS, Finish Workflow done — 31 SUCCESS / 0 FAIL / 2 SKIP (the two skips are the normal Dockers Build (amd/arm)). The integration shards and the sequential stateless shard that were still running at the time of the review above all passed; 04401_datalake_attach_does_not_block_startup passed in the parallel stateless shard.

MERGEABLE / CLEAN, no unresolved review threads. Ready to merge pending maintainer.

@alexey-milovidov
alexey-milovidov merged commit c1c4867 into 26.4 Jun 30, 2026
34 checks passed
@alexey-milovidov
alexey-milovidov deleted the backport/26.4/108674 branch June 30, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants