Repository navigation
TimeSeries: Drop support for external targets - #126742
nikitamikhaylov merged 1 commit into
Conversation
49d62fa to
8e3838f
Compare
|
Workflow [PR], commit [681c2e1] Summary: ✅
AI ReviewSummaryReviewed PR Metadata
Findings
💡 Nits
Tests
Final Verdict |
8e3838f to
1354aec
Compare
1354aec to
5ab8e6f
Compare
Version 10 of the TimeSeries table engine: every target of a new table is an inner table, and the type of the `id` column and the expression generating identifiers are declared in `TAGS INNER COLUMNS` instead of the settings `id_type` and `id_generator`. Tables of earlier versions keep their external target tables and these settings. The settings of the earlier versions are grouped at the end of the settings list. Tests which used external targets or the settings only for convenience use inner tables now, tests of the legacy features are pinned to version 9.
5ab8e6f to
681c2e1
Compare
PromQL Compliance ReportBaseline: S3 master
Extended support (upstream engine tests): native-histogram exclusions: 149; excluded assertions: 248; upstream Note: Prometheus compliance score is unchanged vs baseline. |
Since ClickHouse#117253, `executeToDatabase` takes `getExclusiveDDLGuardForDatabase` on the old database name itself, before `ViewDefinitionsRenaming::prepare` takes it again for both names. `SharedMutex` is not recursive, so every `RENAME DATABASE` blocked forever on the merged tree, including for an empty database. `prepare` now takes only the new name; the old one is held by the caller for the whole rename. `TimeSeriesVersion.h` moved to `Parsers/Prometheus`; the check function is declared in `Storages/TimeSeries/checkTimeSeriesVersion.h`. Since ClickHouse#126742, a new `TimeSeries` table of version 10 cannot have external target tables, so `05345` pins `version = 7` (the latest version when the test was written; tables of version 9 or earlier keep their external targets and are still rewritten). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…pped ClickHouse#126742 made TimeSeries version 10 (inner targets only) the default, so `CREATE TABLE ts ENGINE = TimeSeries DATA ts_data ...` now fails with INCORRECT_QUERY and the test fails before reaching the query it guards. The test needs time series whose tags and time ranges exist while the samples table has no parts. It used to get that by truncating an external data table. Inner tables have generated names, so now the tags are inserted with empty sample arrays and the time ranges are written through `timeSeriesTimeRanges`; the samples for the "with data" part are added through `timeSeriesSamples`. Inserting tags with empty samples alone is not enough: without time ranges no series matches and the query never reaches the parallel replicas local plan. Measured on a debug build: the snapshot master binary (31d10e5, no fix) dies on the test at timeSeriesStoreTags.cpp:117 'Context has expired'; the PR head passes it 50/50 with random settings, 10/10 with serialize_query_plan = 1 and 10/10 with a Replicated database. The reference is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
TimeSeries: Drop support for external targets. Setting
id_typeandid_generatorwere designed to help handling external targets, so they shouldn't be used anymore.Introduces version 10 of the TimeSeries table engine: every target of a new table is an inner table, external targets are not allowed anymore, and settings
id_typeandid_generatoras well. Tables of earlier versions keep their external target tables and these settings.Workflow [PR]
Sync PR [sync-upstream/pr/126742]
Version info
26.11.1.303-master(included in26.11and later)