Skip to content

Backport #118155 to 26.3: Require DROP DATABASE for TRUNCATE of a database over ON CLUSTER - #118338

Merged
PedroTadim merged 1 commit into
26.3from
backport/26.3/118155
Sep 10, 2026
Merged

PedroTadim merged 1 commit into
26.3from
backport/26.3/118155

Conversation

@robot-ch-test-poll

@robot-ch-test-poll robot-ch-test-poll commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #118155

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

@robot-ch-test-poll robot-ch-test-poll 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 Sep 5, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [6f98013]

Summary: ❌

job_name test_name status info comment
Integration tests (amd_tsan, 6/6) failure
test_filesystem_cache/test.py::test_concurrent_eviction[slru] FAIL cidb
test_filesystem_cache/test.py::test_dynamic_resize_slru_failpoint_eviction FAIL cidb

@PedroTadim

Copy link
Copy Markdown
Member

@groeneai can you investigate the CI failures on this PR?

@PedroTadim
PedroTadim merged commit ea9bfd9 into 26.3 Sep 10, 2026
32 of 35 checks passed
@PedroTadim
PedroTadim deleted the backport/26.3/118155 branch September 10, 2026 10:21
@groeneai

Copy link
Copy Markdown
Collaborator

The two reds are one event. In Integration tests (amd_tsan, 6/6) the server aborted during test_filesystem_cache/test.py::test_dynamic_resize_slru_failpoint_eviction, and test_concurrent_eviction[slru] then failed at test.py:1042 with Code: 210. DB::NetException: Connection refused (172.16.1.4:9000) because the node was already gone. BackportPR is red only as the rollup of that one shard.

The abort, from this run's server log:

2026.09.06 00:07:56.052603 [ 840 ] <Fatal> : Logical error: 'Expected 401725 <= 65795
(size: 368957, read range: [32768, 65535], hold file segments: 2
([32768, 65535](DOWNLOADING), [65536, 98303](DOWNLOADED)))'

That is chassert(offset + size <= info.read_until_position) in CachedOnDiskReadBufferFromFile::readFromFileSegment (26.3 :1303).

It is not caused by this backport: the change is +3/-4 in src/Interpreters/InterpreterDropQuery.cpp plus one stateless test, and the abort is on the file cache read path.

It is a missing backport of merged master #106239 "Fix LocalObjectStorage with cache". On 26.3 the REMOTE_FS_READ_BYPASS_CACHE arm of getRemoteReadBuffer assigns info.remote_file_reader = info.implementation_buffer_creator() raw (:332), while the REMOTE_FS_READ_AND_PUT_IN_CACHE arm just above wraps in BoundedReadBuffer whenever supportsRightBoundedReads() is false (:306-311). This test's cache sits on local_blob_storage (config.d/storage_conf.xml:5), and that buffer overrides neither hook (SeekableReadBuffer::supportsRightBoundedReads() returns false, ReadBuffer::setReadUntilPosition() has an empty body), so setReadUntilPosition(std::min(range.right + 1, file_size_)) at :570 is a silent no-op and the read runs to the end of the object. Hence the assertion's left side is 401725, the object size, in every occurrence, while the bound varies (65795 here, 131614 and 329069 on other runs). The corrective resize at :1285 does not save it because it is gated on holding exactly one segment, and every occurrence holds two or three. Master hoists the wrap into one create_remote_read_buffer() used by both arms (:493-498, :525, :549), which is what 26.3 lacks.

The branch split agrees. Over 30 days, on true branch runs of those two tests: 0 failures on master (8894 passes) and 0 on 26.6, 26.7 and 26.8, against 6 failures / 748 passes on 26.3, plus 2/376 on 26.5, which no longer has an open release PR. Every clean branch contains 77634f7; 26.3 and 26.5 do not. Over 90 days the assertion text appears 13 times, all on the 26.3 and 26.5 lines and none on master: the 26.3 tip itself 3 times (most recently 2026-09-10 09:51 UTC) plus 7 distinct backport/26.3/* PRs including this one. Since it fires on the tip too, no backport's diff is involved.

The route to a fix is the v26.3-must-backport label on #106239, which I asked for on 2026-09-07 and which is still pending: #106239 (comment). One caveat recorded there: the code half cherry-picks onto 26.3 with no conflicts, but the test half cannot pass as-is, because it needs skip_cache_on_disk_failure and the cache_filesystem_failure failpoint, and 26.3 has neither.

This PR merged at 10:21 UTC, so nothing here blocks it.

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.

5 participants