Skip to content

Remove PlainObjectStorage and PlainRewritableObjectStorage - #90580

Merged
Michicosun merged 4 commits into
masterfrom
remove_plain_rewritable_object_storage
Nov 25, 2025
Merged

Michicosun merged 4 commits into
masterfrom
remove_plain_rewritable_object_storage

Conversation

@Michicosun

Copy link
Copy Markdown
Member

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):

Continuation of #90538

@clickhouse-gh

clickhouse-gh Bot commented Nov 21, 2025 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [9ff5186]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_msan, parallel) failure
00816_long_concurrent_alter_column FAIL cidb, flaky
03364_prewhere_parallel_replicas FAIL cidb
02521_incorrect_dealy_for_insert_bug_44902 FAIL cidb
00411_long_accurate_number_comparison_int2 FAIL cidb
00596_limit_on_expanded_ast FAIL cidb, flaky
Some queries hung FAIL cidb
Integration tests (amd_binary, 4/5) failure
test_refreshable_mat_view/test.py::test_long_query_cancel FAIL cidb
Integration tests (amd_tsan, 5/6) failure
test_filesystem_cache/test.py::test_force_filesystem_cache_on_merges FAIL cidb
test_filesystem_cache/test.py::test_finished_download_time FAIL cidb
Stress test (amd_debug) failure
Server died FAIL cidb
Hung check failed, possible deadlock found (see hung_check.log) FAIL cidb
Killed by signal (in clickhouse-server.log) FAIL cidb
Fatal message in clickhouse-server.log (see fatal_messages.txt) FAIL cidb
Killed by signal (output files) FAIL cidb
Found signal in gdb.log FAIL cidb
BuzzHouse (amd_debug) failure
Logical error: 'Inconsistent AST formatting: the query: FAIL cidb
BuzzHouse (amd_msan) failure
Received signal 11 FAIL cidb
BuzzHouse (amd_ubsan) failure
Logical error: 'Cannot add action to empty ExpressionActionsChain'. FAIL cidb

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Nov 21, 2025
@Michicosun
Michicosun force-pushed the remove_plain_rewritable_object_storage branch from 93dddce to f711704 Compare November 21, 2025 14:36
@Michicosun
Michicosun force-pushed the remove_plain_rewritable_object_storage branch from f711704 to 4efade7 Compare November 21, 2025 15:08
@jkartseva jkartseva self-assigned this Nov 21, 2025
@Michicosun
Michicosun added this pull request to the merge queue Nov 25, 2025
Merged via the queue into master with commit 82298aa Nov 25, 2025
@Michicosun
Michicosun deleted the remove_plain_rewritable_object_storage branch November 25, 2025 10:18
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 25, 2025
pull Bot pushed a commit to TCeason/ClickHouse that referenced this pull request May 6, 2026
… storage

`StorageS3Configuration::fromDisk` (and the Azure parallel) called
`assert_cast<const S3ObjectStorage &>(*disk->getObjectStorage())` directly.
`assert_cast` checks `typeid` exactly, so any decorator that wraps the
underlying `S3ObjectStorage` — most importantly `CachedObjectStorage` for
disks created with `wrapWithCache(...)` — caused
`Logical error: 'Bad cast from type DB::CachedObjectStorage to DB::S3ObjectStorage'`
during argument parsing.

Historically this also surfaced as
`Bad cast from type DB::PlainObjectStorage<DB::S3ObjectStorage> to DB::S3ObjectStorage`
(reported in ClickHouse#89300). The `PlainObjectStorage<>` decorator was removed in
ClickHouse#90580, but the same pattern still bites for `CachedObjectStorage`. CIDB
shows the cached-disk variant being hit by the BuzzHouse fuzzer (e.g. a
`CREATE TABLE ... ENGINE = DeltaLakeS3(...) SETTINGS disk = '...'` query
on PR ClickHouse#94148) and by `test_storage_iceberg_disks` runs.

Use the existing `IObjectStorage::getUnderlying()` virtual to walk past
any decorator layers before the cast. Apply the same fix to the Azure
path which has the identical pattern.

Add a stateless regression test that exercises `icebergS3` with three
disk shapes (`s3_disk` raw, `s3_cache` wrapped, `s3_plain_disk` plain
metadata). The test does not need a real iceberg table — it asserts that
argument parsing no longer throws a logical error and the query fails
with an expected S3/iceberg error code instead. The CI test config now
allows-lists those four disks for use with table engines so the data
lake disk-validation gate lets the queries through to the real check.

Closes ClickHouse#89300
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