Skip to content

Antalya 26.8: port the CAS PRs merged into antalya-26.6 after the PR 2540 cut - #2805

Merged
filimonov merged 24 commits into
antalya-26.8from
port/antalya-26.8/cas-from-26.6
Nov 12, 2026
Merged

filimonov merged 24 commits into
antalya-26.8from
port/antalya-26.8/cas-from-26.6

Conversation

@filimonov

@filimonov filimonov commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Port to antalya-26.8 of the thirteen CAS PRs that landed on antalya-26.6 after the cut of the combined port #2540 (26.6 after PR 2437 plus 2509-2511). One commit per source PR, cherry-picked from the PR merge commit; conflict notes are in the commit messages.

Ported, in merge order (source category in brackets):

Five commits adapt the picks to 26.8:

  • 78de57b, c798655: the ported CAS gtests read ProfileEvents counters without .load().
  • b8dfb39: gtest_s3_object_creation_requests.cpp includes WriteBufferFromFileBase.h.
  • a2147e5: the object-creation death test calls copyS3File without a source offset.
  • 4e5fc3c: the mount-lease paragraphs stay together in docs/en/antalya/cas/configuration.md.

Resolved by hand against the 26.8-only code:

  • 2555: copyS3File.cpp routes both entry points through copyS3FileImpl on 26.8; the object-creation client is threaded through it, copyS3FileRange passes none. WriteBufferFromS3.cpp keeps the 26.8 transient-error branch. CasPartWriteTxn.cpp uses Cas::nowMs.
  • 2567: CasOrphanManifestSweep.cpp and CasDecommission.cpp against Fix early manifest deletion in CAS GC #2730 (BuildFloor sentinel and the renamed eligibility helper kept).
  • 2516: configuration.md lease paragraphs next to the Packed section; the new gtest_ca_wiring.cpp test after the owner-Move tests.
  • 2577: gtest_cas_ref_wedge_every_attempt.cpp keeps the 26.8 counter reads and takes the new expectThrowsCodeWithMessage assertions.

Four commits do not come from the source PRs:

  • 086efc9 serializes IDisk::checkAccess with a process-wide mutex. After 2573 two custom disks on one backing disk start in parallel and unlink each other's probe file clickhouse_access_check_<server uuid>; the tables fail to attach with FILE_DOESNT_EXIST. Seen in test_filesystem_cache on this PR. The same change for 26.6 is Serialize IDisk::checkAccess: disks created in parallel share the probe file #2812.
  • 8c26e87 tags 03800_autopr_reuse_index_analysis and 03927_autopr_input_bytes_estimation_prewhere_filter no-random-settings. antalya-26.6 carries the tag since Antalya 26.6 - CI Fixes #2013. Without it the tests read test.hits at 150-175 s per query and 03927 is killed at 1200 s.
  • 4810e68 makes 05387_cas_publish_counts_replicated (a 26.8-only test) take the merged part name from system.parts. The literal all_0_1_1 is wrong when a retried insert skips a block number and the merge is all_0_2_1.
  • 2f89c5d applies the review of 2801 (Install CAS decommission test callbacks before workers start #2801 (review)): comment and doc fixes around the decommission clock and sleep seams; openForDecommission reuses CasRefLedger::setCasRetrySleepForTest.

Not ported:

Local check at the head commit: ASan unit_tests_dbms --gtest_filter='CAS*', 2909 tests passed.

Related: #2644
Related: #2540
Related: #2812

Changelog category (leave one):

  • Critical Bug Fix (crash, data loss, RBAC)

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

CAS (content-addressed storage): port the antalya-26.6 fixes and improvements merged after the combined port: a blob is adopted only when its marker reads Clean; an object-creating S3 request is never resent; a mount slot is claimed only with a strictly greater epoch and after the holder's declared lease; lease renewal continues until a definitive answer; renewal progress is shown in system.cas_mounts; nested server_root_id values are refused; decommission keeps a member's control objects and a decommissioned server root rejoins on start; custom disks are created outside storage_policies_mutex; a failed ref-log commit says in its message whether the write is durable, of unknown outcome, or not durable.

Documentation entry for user-facing changes

  • Documentation written: docs/en/antalya/cas/ carried over from the source PRs.

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Unit tests
  • Performance tests
  • Aarch64 tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • CAS (content-addressed storage; Antalya only)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • OAuth (5m)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

filimonov and others added 15 commits November 6, 2026 03:02
Port of #2512 (antalya-26.6) to antalya-26.8.

(cherry picked from commit 2a034cd)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
Port of #2552 (antalya-26.6) to antalya-26.8.

Conflict: `src/Disks/tests/gtest_cas_part_write.cpp`, counter reads without `.load()` as on antalya-26.8.

(cherry picked from commit fef96d5)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
Port of #2513 (antalya-26.6) to antalya-26.8.

(cherry picked from commit c147de3)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
…aiming its slot

Port of #2516 (antalya-26.6) to antalya-26.8.

Conflicts: `docs/en/antalya/cas/configuration.md` (the lease-liveness paragraph replaces the old
"All servers sharing a pool" one and sits before the antalya-26.8 `Packed` section),
`src/Disks/tests/gtest_ca_wiring.cpp` (new test appended after the owner-Move tests).

(cherry picked from commit 21b7170)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
…ite test

On antalya-26.8 `ProfileEvents::Counters::operator[]` returns the value, so the two reads
that came with the port of #2552 did not compile.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
Port of #2555 (antalya-26.6) to antalya-26.8.

Conflicts: `src/IO/S3/copyS3File.cpp` (antalya-26.8 routes `copyS3File` and `copyS3FileRange` through
`copyS3FileImpl`; the object-creation client is threaded through it, the ranged copy passes none),
`src/IO/WriteBufferFromS3.cpp` (the 26.8 transient-error branch is kept and says "will retry" only
when a retry follows), `Pool/CasPartWriteTxn.cpp` (no local `nowMs`, `CasClock.h` has it),
`docs/en/antalya/cas/configuration.md` (settings table rows).

(cherry picked from commit 8fefc27)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
… is a pause

Port of #2517 (antalya-26.6) to antalya-26.8.

(cherry picked from commit 9e54034)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
…tionable member refusals

Port of #2566 (antalya-26.6) to antalya-26.8.

(cherry picked from commit af662dc)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
…och nonce

Port of #2567 (antalya-26.6) to antalya-26.8.

Conflicts with the PR 2730 port already on antalya-26.8: `Gc/CasOrphanManifestSweep.cpp` (keeps the
`BuildFloor` sentinel test and the renamed eligibility helper; `sweepNamespace` admits through
`mountRequests` as this PR does), `Tools/CasDecommission.cpp` (PR 2730 comment kept; the old slot-removal
tail goes as in this PR).

(cherry picked from commit 9b348cf)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
Port of #2594 (antalya-26.6) to antalya-26.8.

(cherry picked from commit 6a1085e)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
Port of #2574 (antalya-26.6) to antalya-26.8.

(cherry picked from commit 11ab9a4)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
Port of #2573 (antalya-26.6) to antalya-26.8.

(cherry picked from commit 52c95e2)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
The `Packed` parts subsection sat between the settings table and the lease-liveness prose; it now
follows that prose, so the three lease paragraphs read in the antalya-26.6 order.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
…AS tests

Same cause as 78de57b: on antalya-26.8 `ProfileEvents::Counters::operator[]` returns the value.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
On antalya-26.8 no other header of the test pulls it in transitively.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Workflow [PR], commit [2f89c5d]

k-morozov
k-morozov previously approved these changes Nov 6, 2026
… death test

On antalya-26.8 the ranged copy is `copyS3FileRange`; `copyS3File` has no
`src_offset` parameter. The call sits under `DEBUG_OR_SANITIZER_BUILD`,
which the release build does not compile.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
k-morozov
k-morozov previously approved these changes Nov 6, 2026
…be file

Every disk probes its access with the same file name, clickhouse_access_check_<server uuid>.
Since custom disks are created outside storage_policies_mutex
(#2573), two tables whose custom disks sit on one
backing disk are started in parallel at server start, and their probes overwrite and unlink
each other's file: the tables fail to attach with FILE_DOESNT_EXIST "While checking access
for disk ...". Seen in test_filesystem_cache on
#2805 (tables test and test_size_in_name, cache
disks over hdd_blob). A process-wide mutex around the probe; config disks are created one
after another anyway.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
filimonov and others added 2 commits November 6, 2026 18:03
Under randomized settings with `enable_filesystem_cache=0` these stateful tests read
`test.hits` from the web disk in one HTTP stream at about 1.5 MB/s: 150-175 s per query,
03927 killed at 1200 s. antalya-26.6 carries the tag since
#2013; antalya-26.8 does not.

CI: https://altinity-build-artifacts.s3.amazonaws.com/PRs/2805/a2147e556977e195b2d117c61b61d1274e080436/stateless_tests_amd_binary_cas_s3_storage_parallel/job.log
PR: #2805

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
#2577, merged into antalya-26.6 as ae6e749.
Conflict in src/Disks/tests/gtest_cas_ref_wedge_every_attempt.cpp: keep the 26.8 ProfileEvents
counter reads without .load(), take the new expectThrowsCodeWithMessage assertions.

(cherry picked from commit ae6e749)

Signed-off-by: Mikhail Filimonov <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
filimonov added a commit to filimonov/ClickHouse that referenced this pull request Nov 11, 2026
`5a1ffb222a5` removed the `no-cas-storage` tags on antalya-26.8 on purpose.
The limits test passes in 12-20 s on non-sanitizer CAS lanes and in 36.6 s
alone under local ASan cas-s3; it exceeds its budgets on loaded sanitizer lanes
and is already BROKEN on tsan without CAS (MasterCI run 39839856866).

Altinity#2805

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
filimonov added a commit to filimonov/ClickHouse that referenced this pull request Nov 11, 2026
filimonov added a commit to filimonov/ClickHouse that referenced this pull request Nov 11, 2026
CAS-450 records the baseline run of Altinity#2805
(22 failed jobs), the EXPORT PART limits-test measurements, the CI commits dropped
from the port and the non-CAS reds. It depends on the 31 open CI tasks, which get
the label `theme:ci-stabilization`. CAS-444: the 26.8 port is on PR 2805.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
@filimonov
filimonov merged commit db0431e into antalya-26.8 Nov 12, 2026
410 of 440 checks passed

@mkmkme mkmkme left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Posted by an LLM agent on behalf of @mkmkme]

Reviewed the port against the antalya-26.6 merge commits of all thirteen source PRs: for each one I compared the added/removed lines of the source merge diff with the port commit diff. Nine are byte-identical; the four with deltas match what the PR body describes:

  • 2552: only the .load() on three ProfileEvents reads in gtest_cas_part_write.cpp, as on 26.8.
  • 2516: the lease-liveness paragraph placed before the Packed section of configuration.md.
  • 2555: copyS3FileImpl is the 26.8 funnel; the creation client is threaded through it, copyS3File asserts NativeOnly when it is set, copyS3FileRange passes none. The 26.8 transient-error branch in WriteBufferFromS3.cpp only retries definitive errors (NO_SUCH_KEY, InvalidPart, InvalidPartOrder) and CAS caps that loop at one attempt via s3_max_unexpected_write_error_retries_override on both branches, so the single-attempt invariant holds on 26.8.
  • 2567: CasOrphanManifestSweep.cpp keeps the BuildFloor sentinel comparison because the 26.8 helper takes a BuildFloor; CasDecommission.cpp keeps the PR 2730 comment, which is also what antalya-26.6 HEAD has after 2806.

The 26.8-only call sites of the changed APIs (copyS3File, objectCreationClient) are the same set as on 26.6. Both merges of antalya-26.8 into the branch are clean auto-merges (tree equals git merge-tree of the parents). 086efc9 is byte-identical to the head of #2812. 2f89c5d addresses all five points of the 2801 review.

Non-blocking notes:

  • 2f89c5d exists only here: antalya-26.6 still has the lambda in openForDecommission and the stale comments. A 26.6 follow-up is needed for parity.
  • 2812 is still open on 26.6; if its review changes the fix, this branch has to follow.
  • 2594 was picked from 6a1085e (the single commit) rather than the merge commit aedac0c. Content is identical.
  • The no-cas-storage note concerns tags none of the thirteen PRs touch; the tagged files that 26.6 still has are the EXPORT PART tests 26.8 un-tagged on purpose, or broken-part tests that no longer exist on 26.8.

filimonov added a commit that referenced this pull request Nov 13, 2026
Both instances start from `clickhouse/clickhouse-server:26.8.26.12` with the fork's `config.xml`,
and since ClickHouse#100332 an upstream server refuses it:
`Unknown elements 'cas_log', 'cas_gc_log' found in config /etc/clickhouse-server/config.xml
(UNKNOWN_ELEMENT_IN_CONFIG)`. Set `skip_check_for_incorrect_settings` for these two instances only.
The test is `test_custom_s3_disk_remote_url_allow_hosts`.

CI: https://altinity-build-artifacts.s3.amazonaws.com/PRs/2805/8c26e8792eb4d675d6cfa59b06f8e31b38471008/integration_tests_amd_asan_ubsan_targeted/logs.tar.gz
PR: #2805

Signed-off-by: Mikhail Filimonov <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
filimonov added a commit that referenced this pull request Nov 13, 2026
On the 32 GiB func-tester the `amd_asan_ubsan, cas s3 storage` shards cross clickhouse-test's 0.8
memory-pressure threshold after about 2 h. Under ASan the server RSS is per-thread runtime state
(fake stacks, thread stacks, allocator regions; `MemoryTracking` stays at 0.4-1.5 GiB of 22 GiB)
and keeps growing with the pool threads, so shedding workers does not lower it and the shard
drains to one worker until the 3.5 h job timeout. Reproduced locally with the CI worker count and
memory cap.

Run the shards on `AMD_LARGE`, the runner the plain ASan parallel lane already uses. Its
`altinity-builder, 64g` label gives 64 GiB instead of 32, which puts the ~23 GiB peak at 40% of
the cap. The three workflow files are regenerated with `python3 -m ci.praktika yaml`: six
`runs-on` lines change from `altinity-func-tester, 16c` to `altinity-builder, 64g`.

CI: https://altinity-build-artifacts.s3.amazonaws.com/json.html?PR=2805&sha=ad04f95e44190bff34b9e5330054a01abaa848ec&name_0=PR
PR: #2805

Signed-off-by: Mikhail Filimonov <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
@filimonov filimonov mentioned this pull request Nov 13, 2026
2 of 31 tasks
@DimensionWieldr

Copy link
Copy Markdown
Collaborator

No CI fails caused by PR.

AI audit found defects filed in: #2837

  • High defect should be looked at; it can lead to server crashes!

Ran CAS checks: https://github.com/Altinity/clickhouse-regression/actions/runs/43384156461

  • Nothing PR-caused

@DimensionWieldr DimensionWieldr added verified Approved for release verified-with-issues Verified by QA and issues found. labels Nov 16, 2026
filimonov added a commit to filimonov/ClickHouse that referenced this pull request Nov 17, 2026
15 failed jobs on head `2f89c5db182`. Run notes on CAS-450, CAS-127, CAS-440,
CAS-431, CAS-252, CAS-443. Two reds had no task: a TSan stage-5 timeout of
`04078_native_protocol_input_validation` (CAS-464) and a fourth swarms scenario
on the release regression job (CAS-465).

Related: Altinity#2805

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
filimonov added a commit to filimonov/ClickHouse that referenced this pull request Nov 17, 2026
Notes on CAS-436, CAS-450, CAS-437, CAS-438, CAS-442, CAS-444, CAS-443, CAS-432.
Altinity#2805

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
filimonov added a commit to filimonov/ClickHouse that referenced this pull request Nov 17, 2026
The approving review of Altinity#2805
lists two open items: 2f89c5d is missing on antalya-26.6 (CAS-444),
and the fix of Altinity#2812 may still
change in review (CAS-437).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Mikhail Filimonov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants