Skip to content

Backport #119850 to 26.8: Do not create a disk defined in SQL while deciding whether ALTER ... MODIFY SETTING disk is allowed - #124151

Merged
clickhouse-gh[bot] merged 3 commits into
26.8from
backport/26.8/119850
Oct 6, 2026
Merged

clickhouse-gh[bot] merged 3 commits into
26.8from
backport/26.8/119850

Conversation

@robot-clickhouse

@robot-clickhouse robot-clickhouse commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Original pull-request #119850
Cherry-pick pull-request #124005

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.8.20.6

…eciding whether `ALTER ... MODIFY SETTING disk` is allowed
@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 Oct 6, 2026
@clickhouse-gh

clickhouse-gh Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [2e05dba]

Summary: ✅

alexey-milovidov and others added 2 commits October 6, 2026 19:53
The tests of #119850 also cover behaviour that came from
#110665, which was not
backported to 26.8 (its cherry-pick was closed). In 26.8 the
`custom_local_disks_base_directory` check of a disk defined in SQL runs
after the disk is registered and its directory created, does not cover
object storage disks over the local filesystem (they are reported as
remote), and exempts a disk named `backup`.

Keep the part that this backport fixes: `ALTER TABLE ... MODIFY SETTING
disk = disk(...)` with a local path outside the base directory is now
rejected, and the settings constraints still compare the resolved disk.
Drop the checks of registration and directory creation, the object
storage cases, and the integration test for a `locations` child with a
local backend, which all depend on #110665.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=124151&sha=1348e3964bcfa0dfa2569720e5461b11401f7b5b&name_0=BackportPR
PR: #124151

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 The backported tests also covered behaviour that comes from #110665, which is not in 26.8 (its cherry-pick #121566 was closed). In 26.8, a disk defined in SQL is registered (and its directory created) before the custom_local_disks_base_directory check runs. That check also skips object storage disks over the local filesystem and disks named backup. So 05217_custom_disk_local_path_alter and test_dynamic_disk_include_locations_child_local_path_is_fenced failed on this branch.

I adapted the tests in fd4a33f. The stateless test still checks what this backport fixes: ALTER TABLE ... MODIFY SETTING disk = disk(...) with a local path outside the base directory is now rejected, and the merge_tree_disk constraint still applies. I dropped the checks that depend on #110665: disk registration, directory creation, the object storage cases, and the locations-child integration test. I also merged the latest 26.8.

01304_direct_io_long hit a 300 s timeout on an INSERT of 50M rows under ASan. It is labelled flaky and is unrelated to this change. @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=124151&sha=1348e3964bcfa0dfa2569720e5461b11401f7b5b&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20distributed%20plan%2C%20parallel%29 and provide a fix in a separate PR. If the fix is already in progress, link it here.

@groeneai

groeneai commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Acknowledged. I'm investigating the 01304_direct_io_long timeout. First finding: #92064 meant to skip this test under ASan, but it only added the # - no-asan - ... comment line, not no-asan to the # Tags: line, so the test still runs in the ASan jobs on both master and 26.8. Whole-test durations of passing runs in Stateless tests (amd_asan_ubsan, distributed plan, parallel) over the last 90 days: p50 ~100 s, p95 ~270 s, max ~386 s, while the INSERT + OPTIMIZE step alone is capped at max_execution_time = 300. No fix PR is open yet; I'll follow up here with the master PR link.

@clickhouse-gh
clickhouse-gh Bot merged commit 5e07bf4 into 26.8 Oct 6, 2026
41 of 42 checks passed
@clickhouse-gh
clickhouse-gh Bot deleted the backport/26.8/119850 branch October 6, 2026 22:06
@groeneai

groeneai commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

The fix is in #124328: it adds no-asan to the # Tags: line of 01304_direct_io_long.sh, which #92064 intended but did not do. The 26.8 runner has the same tag line and skip logic, so after #124328 merges it needs v26.8-must-backport to stop this timeout on 26.8.

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.

4 participants