Repository navigation
fix loading old S3 tables with globbed paths - #115277
Conversation
|
Workflow [PR], commit [d9e3080] Summary: ❌
AI ReviewSummaryThis PR restores the pre- Missing context / blind spots
Findings
Final VerdictNeeds changes: the fix is incomplete for already-existing plain-path object-storage tables created before LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 158/161 (98.14%) · Uncovered code |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
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. Object file sizes19 object files changed (+19.77 KiB total), 0 added.
737 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units112 translation units recompiled, 1028 s compile time in total, 112 of them have a recent master baseline. |
9101e0f to
d1ce3db
Compare
6bfd257 to
e301cbb
Compare
b1326f0 to
71b211d
Compare
|
@groeneai can you investigate why the build is failing? |
|
No build is failing. All 40 What actually happened (job log): 399 At 98% the job was killed: Root cause is the container memory limit, from The kernel OOM-killed 8 processes inside the job container (3 The arithmetic is the interesting part. This is not your diff. One caveat on unblocking: I would not expect a plain re-run to help here. I checked |
|
|
First a correction to my own number, because it does not answer what you asked. The 66 was job-level breadth: every red of Three PRs other than yours, same module, same error (container 104431 at 114054 at 109310 at Two more in the 10-day window have the identical kill shape in a different module, so they support the mechanism but not the same-test half of the question: 111663 ( On why the module is the stable part and the victim test is not: this check runs |
|
@groeneai but what triggered sudden failure of |
|
Direct answers: nothing in your diff triggered it, and no, I cannot point at another PR where Why editing the file is the trigger. This is also why master is green. Master never runs this job at all: 60 days of CIDB has 159155 rows / 726 PRs and 0 non-PR runs. The regular integration jobs run On your second question, the honest answer. In 90 days, 9 PRs ran
The five in the bottom row exited The cleanest evidence that your diff is irrelevant is PR 104431, which already ran the natural experiment. Four consecutive shas edited Why now, and the actual defect. Nothing here needs a change from you, and I would not read that job as a signal about this PR. |
| if (!is_create_query) | ||
| { | ||
| case FileLikeEngineDefaultPartitionStrategy::WILDCARD: | ||
| { | ||
| /// The path has no `{_partition_id}` placeholder (checked above), so | ||
| /// `PartitionStrategyFactory::get` will raise `BAD_ARGUMENTS`. | ||
| partition_strategy_type = PartitionStrategyFactory::StrategyType::WILDCARD; | ||
| break; | ||
| } | ||
| case FileLikeEngineDefaultPartitionStrategy::HIVE: | ||
| /// Backward compatibility on ATTACH / server startup / RESTORE / replicated-DDL replay: | ||
| /// derive the implicit strategy from the path rather than from the mutable default. | ||
| partition_strategy_type = PartitionStrategyFactory::StrategyType::HIVE; |
There was a problem hiding this comment.
This still does not preserve the pre-26.6 behavior for existing plain-path tables. A 26.5 table like ENGINE = S3('.../root', 'Parquet') PARTITION BY d stored no explicit partition_strategy, so on reload it reaches this branch and is still forced to hive. That turns a previously ignored PARTITION BY into an active hive strategy and also flips the implicit partition_columns_in_data_file default to false.
New CREATEs are stable because this PR now persists partition_strategy = 'none', but pre-existing metadata never gets that marker. So the upgrade side of #114705 is still unresolved for the "393 plain-path tables" called out in the issue, even though the PR body closes it.
|
📊 Cloud Performance Report ✅ AI verdict: no significant changes detected. K_source=6 K_base=12 flagged=0/65 clickbench🟢 No significant changes tpch_adapted_1_official🟢 No significant changes Debug info
|
Backport #115277 to 26.8: fix loading old S3 tables with globbed paths
Reproducer-- 26.6 / 26.7: fails with Code: 36 BAD_ARGUMENTS
-- "Partition strategy hive can not be used with a globbed path"
-- 26.5 and older, and master after #115277: creates fine.
CREATE TABLE t (d Date, x UInt64)
ENGINE = S3('s3://bucket/test_04909/**.parquet', 'Parquet')
PARTITION BY d;
-- Same failure hits metadata load, so a table created before 26.6
-- aborts server startup after the upgrade.Results:
Backport the fix to CC introducing PR author: @kssenii CC component owner: @scanhex12 @divanik Analysis metadata
|
… parser Since ClickHouse#115277 the server persists an implicit `none` partition strategy of an object storage table as a trailing `partition_strategy = 'none'` engine argument, for S3 and Azure. The Azure readers of a positional argument list, `AzureStorageParsedArguments::fromAST` and `addStructureAndFormatToArgsIfNeededAzure`, evaluated every argument as a constant expression, so that `equals` node failed with UNKNOWN_IDENTIFIER. An AzureBlobStorage table created with PARTITION BY under `file_like_engine_default_partition_strategy = 'wildcard'` (the default for `compatibility` older than 26.6) could not be attached again, and the server did not start. Both readers now split off the trailing `identifier = value` arguments. `fromAST` accepts `partition_strategy` and `partition_columns_in_data_file` there, applies them like their positional forms and keeps the arguments in the AST as written. Other keys, a key given both positionally and as a key-value argument, and key-value arguments after fewer than three positional ones are rejected. The key must be an identifier, so a positional constant such as `1 = 1` keeps its meaning. `addStructureAndFormatToArgsIfNeededAzure` completes the positional arguments and appends the key-value ones back. The reading side is fixed because only it lets tables already written by 26.8 and 26.9 load again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Before ClickHouse
26.6,S3tables could use a path like**.parquettogetherwith
PARTITION BY. These tables were read-only, so ClickHouse ignoredPARTITION BY.#86746 changed this in ClickHouse 26.6. #107437 also changed how the default
strategy is selected. ClickHouse now tries to use either
hiveorwildcard. Neither workswith this kind of path unless it contains
{_partition_id}. Because of this, tables createdbefore 26.6 can fail to load after an upgrade.
Use the old behavior for these tables when
partition_strategyis not set.Invalid strategies that users set explicitly still fail.
Changelog category (leave one):
Closes: #114705
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix loading old S3 tables with globbed paths and
PARTITION BYafter upgrading from versions before 26.6.Workflow [PR]
Sync PR [sync-upstream/pr/115277]
Version info
26.8.1.2010