Skip to content

Fix clickhouse-local CORS CLI overrides - #115129

Merged
alexey-milovidov merged 3 commits into
masterfrom
continue-pr-115045-cors-followup
Aug 18, 2026
Merged

alexey-milovidov merged 3 commits into
masterfrom
continue-pr-115045-cors-followup

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

Preserve custom http_options_response headers supplied through the post--- configuration surface in clickhouse-local, and cover the full browser preflight response.

Related: #115045

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...


Workflow [PR]
Sync PR [sync-upstream/pr/115129]

Version info

  • Merged into: 26.8.1.1653 (included in 26.8 and later)

@clickhouse-gh

clickhouse-gh Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [214d489]

Summary: ✅


AI Review

Summary

This PR fixes clickhouse-local CORS initialization so child-only http_options_response keys supplied through the post--- configuration surface are no longer overwritten by the built-in defaults, and it extends the stateless coverage around browser preflight handling. I did not find a correctness, safety, or test-coverage issue in the current diff.

Final Verdict

✅ No blocking issues found.

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.80% 86.80% +0.00%
Functions 92.00% 92.00% +0.00%
Branches 79.20% 79.20% +0.00%

Changed lines: Changed C/C++ lines covered: 15/16 (93.75%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Aug 17, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 214d489f5 with master c545616f6 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes
Binary Master PR Δ
programs/clickhouse-stripped 702.05 MiB 699.03 MiB -3.03 MiB (-0.43%)

Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction.

Compile time of recompiled translation units

7 translation units recompiled, 15 s compile time in total, 7 of them have a recent master baseline.

Job report

@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 @groeneai, investigate the unrelated BuzzHouse arm ASan signal failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=115129&sha=c5a742767300db02fb6e538e45400b4b98c8bb95&name_0=PR&name_1=BuzzHouse%20%28arm_asan_ubsan%29. The failure is outside this clickhouse-local CORS change; the currently open diagnostic tracking issue is #106237. If a fix is already in progress, please link it here.

@groeneai

Copy link
Copy Markdown
Collaborator

🕵 A fix is already in progress: #107091.

fatal.log gives the cause of Received signal -1 (STID: 3782-2f00):

Loading of outdated parts failed. Will terminate to avoid undefined behaviour due to
inconsistent set of parts. Exception: Code: 241. DB::Exception: Failpoint: simulated
cache non-errno failure ... (MEMORY_LIMIT_EXCEEDED)

FileSegment::write (FileSegment.cpp:502, failpoint cache_filesystem_failure_non_errno, armed by
BuzzHouse at fuzzerout.sql:302) -> CachedOnDiskReadBufferFromFile -> IMergeTreeDataPart::loadColumns
-> MergeTreeData::loadOutdatedDataParts, whose catch (...) at MergeTreeData.cpp:3534-3539 calls
std::terminate() unconditionally. The aborting thread's query id is BgSchPool::dfcb57d3-..., i.e. the
async loader from MergeTreeData.cpp:3155.

MEMORY_LIMIT_EXCEEDED is retryable by ClickHouse's own classifier (isNotEnoughMemoryErrorCode ->
isRetryableException, checkDataPart.cpp:62-71), so loadDataPartWithRetries retries it, but after
max_tries it rethrows into that catch and the server aborts although nothing on disk is inconsistent.
#107091 makes that catch reschedule instead of terminate for retryable exceptions, and does the same per
part, at schedule time, and in the unexpected-parts loader.

Unrelated to this PR: the diff is programs/local/LocalServer.cpp plus one stateless test, nothing in the
part-loading or file-cache paths.

One correction: the tracker for this signature is #106736, not #106237 (that one is
Logical error: Pipeline stuck). 90d CIDB breadth for 3782-2f00: 18 rows / 17 distinct PRs / 3 on
master, first seen 2026-06-01.

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

A very thorough change for a minuscule detail.

@alexey-milovidov alexey-milovidov self-assigned this Aug 18, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Aug 18, 2026
Merged via the queue into master with commit 0fb3c6b Aug 18, 2026
182 checks passed
@alexey-milovidov
alexey-milovidov deleted the continue-pr-115045-cors-followup branch August 18, 2026 19:20
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 18, 2026
alexey-milovidov added a commit that referenced this pull request Aug 24, 2026
Edited following .claude/skills/edit-changelog/SKILL.md, by hand on a
workstation: the editing step of the NightlyChangelog job has been failing
its own verification since 2026-08-12, so three raw blocks had accumulated
(47 + 84 + 628 entries).

Of the 759 raw entries, 482 are integrated into the in-progress 26.8 section
and 277 are dropped:

- Section 3: the 300 `NOT FOR CHANGELOG / INSIGNIFICANT` entries are dropped,
  except 41 that describe a user-visible change and are promoted into a real
  category, among them a server abort on a corrupt `ORC` stripe footer
  (#114924), `EXPLAIN ANALYZE` for streaming queries (#112445), `SELECT` from
  `TimeSeries` (#115622), streaming watermarks (#106169), and the
  `clickhouse-local` CORS overrides (#115129).
- Section 2: every revert in the range cancels out inside it, so neither side
  appears. Two are re-applications: #114912 re-applies the
  `accurateCastOrDefault` fix, so #109946 keeps its entry with both links and
  the intervening revert #114911 is gone; #114409 re-applies the PromQL
  streaming plan, recorded on the #113656 entry.
- Section 4: `Build/Testing/Packaging Improvement` keeps the seven entries a
  user, packager or from-source builder notices (musl `getaddrinfo` and
  `sched_getcpu`, signed macOS artifacts, Debian packages for release builds
  only, zstd-compressed Docker layers, `unit_tests_dbms` without the full
  library set, vendored Rust built with optimizations locally) and drops the
  CI plumbing.
- Sections 5 and 6: bare pull request URLs converted to links, settings put
  in backticks, four entries rewritten from developer notes into user-visible
  descriptions, and three moved into `Performance Improvement`.

No entry of a strict-retention category was deleted: the job's own
`verify_edit` passes on this edit.

Not done here, because the release manager does it at release time: the full
significance sort, the aggressive merging of sibling pull requests, and the
`FIXME` release date and presentation links.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants