Merge remote-tracking branch 'blessed/master' into bad_logs

This commit is contained in:
Raúl Marín 2024-08-02 13:37:00 +02:00
commit 0cd18688e1
49 changed files with 1518 additions and 641 deletions

View File

@ -22,7 +22,6 @@
#### New Feature
* Add `ASOF JOIN` support for `full_sorting_join` algorithm. [#55051](https://github.com/ClickHouse/ClickHouse/pull/55051) ([vdimir](https://github.com/vdimir)).
* Add new window function `percent_rank`. [#62747](https://github.com/ClickHouse/ClickHouse/pull/62747) ([lgbo](https://github.com/lgbo-ustc)).
* Support JWT authentication in `clickhouse-client` (will be available only in ClickHouse Cloud). [#62829](https://github.com/ClickHouse/ClickHouse/pull/62829) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Add SQL functions `changeYear`, `changeMonth`, `changeDay`, `changeHour`, `changeMinute`, `changeSecond`. For example, `SELECT changeMonth(toDate('2024-06-14'), 7)` returns date `2024-07-14`. [#63186](https://github.com/ClickHouse/ClickHouse/pull/63186) ([cucumber95](https://github.com/cucumber95)).
* Introduce startup scripts, which allow the execution of preconfigured queries at the startup stage. [#64889](https://github.com/ClickHouse/ClickHouse/pull/64889) ([pufit](https://github.com/pufit)).

View File

@ -34,17 +34,13 @@ curl https://clickhouse.com/ | sh
Every month we get together with the community (users, contributors, customers, those interested in learning more about ClickHouse) to discuss what is coming in the latest release. If you are interested in sharing what you've built on ClickHouse, let us know.
* [v24.7 Community Call](https://clickhouse.com/company/events/v24-7-community-release-call) - Jul 30
* [v24.8 Community Call](https://clickhouse.com/company/events/v24-8-community-release-call) - August 29
## Upcoming Events
Keep an eye out for upcoming meetups and events around the world. Somewhere else you want us to be? Please feel free to reach out to tyler `<at>` clickhouse `<dot>` com. You can also peruse [ClickHouse Events](https://clickhouse.com/company/news-events) for a list of all upcoming trainings, meetups, speaking engagements, etc.
* [ClickHouse Meetup in Paris](https://www.meetup.com/clickhouse-france-user-group/events/300783448/) - Jul 9
* [ClickHouse Cloud - Live Update Call](https://clickhouse.com/company/events/202407-cloud-update-live) - Jul 9
* [ClickHouse Meetup @ Ramp - New York City](https://www.meetup.com/clickhouse-new-york-user-group/events/300595845/) - Jul 9
* [AWS Summit in New York](https://clickhouse.com/company/events/2024-07-awssummit-nyc) - Jul 10
* [ClickHouse Meetup @ Klaviyo - Boston](https://www.meetup.com/clickhouse-boston-user-group/events/300907870) - Jul 11
* MORE COMING SOON!
## Recent Recordings
* **Recent Meetup Videos**: [Meetup Playlist](https://www.youtube.com/playlist?list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U) Whenever possible recordings of the ClickHouse Community Meetups are edited and presented as individual talks. Current featuring "Modern SQL in 2023", "Fast, Concurrent, and Consistent Asynchronous INSERTS in ClickHouse", and "Full-Text Indices: Design and Experiments"

View File

@ -0,0 +1,73 @@
---
sidebar_position: 1
sidebar_label: 2024
---
# 2024 Changelog
### ClickHouse release v24.4.4.113-stable (d63a54957bd) FIXME as compared to v24.4.3.25-stable (a915dd4eda4)
#### Improvement
* Backported in [#65884](https://github.com/ClickHouse/ClickHouse/issues/65884): Always start Keeper with sufficient amount of threads in global thread pool. [#64444](https://github.com/ClickHouse/ClickHouse/pull/64444) ([Duc Canh Le](https://github.com/canhld94)).
* Backported in [#65303](https://github.com/ClickHouse/ClickHouse/issues/65303): Returned back the behaviour of how ClickHouse works and interprets Tuples in CSV format. This change effectively reverts https://github.com/ClickHouse/ClickHouse/pull/60994 and makes it available only under a few settings: `output_format_csv_serialize_tuple_into_separate_columns`, `input_format_csv_deserialize_separate_columns_into_tuple` and `input_format_csv_try_infer_strings_from_quoted_tuples`. [#65170](https://github.com/ClickHouse/ClickHouse/pull/65170) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* Backported in [#65894](https://github.com/ClickHouse/ClickHouse/issues/65894): Respect cgroup CPU limit in Keeper. [#65819](https://github.com/ClickHouse/ClickHouse/pull/65819) ([Antonio Andelic](https://github.com/antonio2368)).
#### Critical Bug Fix (crash, LOGICAL_ERROR, data loss, RBAC)
* Backported in [#65372](https://github.com/ClickHouse/ClickHouse/issues/65372): Fix a bug in ClickHouse Keeper that causes digest mismatch during closing session. [#65198](https://github.com/ClickHouse/ClickHouse/pull/65198) ([Aleksei Filatov](https://github.com/aalexfvk)).
* Backported in [#66883](https://github.com/ClickHouse/ClickHouse/issues/66883): Fix unexpeced size of low cardinality column in function calls. [#65298](https://github.com/ClickHouse/ClickHouse/pull/65298) ([Raúl Marín](https://github.com/Algunenano)).
* Backported in [#65435](https://github.com/ClickHouse/ClickHouse/issues/65435): Forbid `QUALIFY` clause in the old analyzer. The old analyzer ignored `QUALIFY`, so it could lead to unexpected data removal in mutations. [#65356](https://github.com/ClickHouse/ClickHouse/pull/65356) ([Dmitry Novik](https://github.com/novikd)).
* Backported in [#65448](https://github.com/ClickHouse/ClickHouse/issues/65448): Use correct memory alignment for Distinct combinator. Previously, crash could happen because of invalid memory allocation when the combinator was used. [#65379](https://github.com/ClickHouse/ClickHouse/pull/65379) ([Antonio Andelic](https://github.com/antonio2368)).
* Backported in [#65710](https://github.com/ClickHouse/ClickHouse/issues/65710): Fix crash in maxIntersections. [#65689](https://github.com/ClickHouse/ClickHouse/pull/65689) ([Raúl Marín](https://github.com/Algunenano)).
* Backported in [#66689](https://github.com/ClickHouse/ClickHouse/issues/66689): Fix the VALID UNTIL clause in the user definition resetting after a restart. Closes [#66405](https://github.com/ClickHouse/ClickHouse/issues/66405). [#66409](https://github.com/ClickHouse/ClickHouse/pull/66409) ([Nikolay Degterinsky](https://github.com/evillique)).
* Backported in [#67499](https://github.com/ClickHouse/ClickHouse/issues/67499): Fix crash in DistributedAsyncInsert when connection is empty. [#67219](https://github.com/ClickHouse/ClickHouse/pull/67219) ([Pablo Marcos](https://github.com/pamarcos)).
#### Bug Fix (user-visible misbehavior in an official stable release)
* Backported in [#65353](https://github.com/ClickHouse/ClickHouse/issues/65353): Fix possible abort on uncaught exception in ~WriteBufferFromFileDescriptor in StatusFile. [#64206](https://github.com/ClickHouse/ClickHouse/pull/64206) ([Kruglov Pavel](https://github.com/Avogar)).
* Backported in [#65060](https://github.com/ClickHouse/ClickHouse/issues/65060): Fix the `Expression nodes list expected 1 projection names` and `Unknown expression or identifier` errors for queries with aliases to `GLOBAL IN.`. [#64517](https://github.com/ClickHouse/ClickHouse/pull/64517) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Backported in [#65329](https://github.com/ClickHouse/ClickHouse/issues/65329): Fix the crash loop when restoring from backup is blocked by creating an MV with a definer that hasn't been restored yet. [#64595](https://github.com/ClickHouse/ClickHouse/pull/64595) ([pufit](https://github.com/pufit)).
* Backported in [#64833](https://github.com/ClickHouse/ClickHouse/issues/64833): Fix bug which could lead to non-working TTLs with expressions. [#64694](https://github.com/ClickHouse/ClickHouse/pull/64694) ([alesapin](https://github.com/alesapin)).
* Backported in [#65086](https://github.com/ClickHouse/ClickHouse/issues/65086): Fix removing the `WHERE` and `PREWHERE` expressions, which are always true (for the new analyzer). [#64695](https://github.com/ClickHouse/ClickHouse/pull/64695) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Backported in [#65540](https://github.com/ClickHouse/ClickHouse/issues/65540): Fix crash for `ALTER TABLE ... ON CLUSTER ... MODIFY SQL SECURITY`. [#64957](https://github.com/ClickHouse/ClickHouse/pull/64957) ([pufit](https://github.com/pufit)).
* Backported in [#65578](https://github.com/ClickHouse/ClickHouse/issues/65578): Fix crash on destroying AccessControl: add explicit shutdown. [#64993](https://github.com/ClickHouse/ClickHouse/pull/64993) ([Vitaly Baranov](https://github.com/vitlibar)).
* Backported in [#65161](https://github.com/ClickHouse/ClickHouse/issues/65161): Fix pushing arithmetic operations out of aggregation. In the new analyzer, optimization was applied only once. [#65104](https://github.com/ClickHouse/ClickHouse/pull/65104) ([Dmitry Novik](https://github.com/novikd)).
* Backported in [#65616](https://github.com/ClickHouse/ClickHouse/issues/65616): Fix aggregate function name rewriting in the new analyzer. [#65110](https://github.com/ClickHouse/ClickHouse/pull/65110) ([Dmitry Novik](https://github.com/novikd)).
* Backported in [#65730](https://github.com/ClickHouse/ClickHouse/issues/65730): Eliminate injective function in argument of functions `uniq*` recursively. This used to work correctly but was broken in the new analyzer. [#65140](https://github.com/ClickHouse/ClickHouse/pull/65140) ([Duc Canh Le](https://github.com/canhld94)).
* Backported in [#65668](https://github.com/ClickHouse/ClickHouse/issues/65668): Disable `non-intersecting-parts` optimization for queries with `FINAL` in case of `read-in-order` optimization was enabled. This could lead to an incorrect query result. As a workaround, disable `do_not_merge_across_partitions_select_final` and `split_parts_ranges_into_intersecting_and_non_intersecting_final` before this fix is merged. [#65505](https://github.com/ClickHouse/ClickHouse/pull/65505) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Backported in [#65786](https://github.com/ClickHouse/ClickHouse/issues/65786): Fixed bug in MergeJoin. Column in sparse serialisation might be treated as a column of its nested type though the required conversion wasn't performed. [#65632](https://github.com/ClickHouse/ClickHouse/pull/65632) ([Nikita Taranov](https://github.com/nickitat)).
* Backported in [#65810](https://github.com/ClickHouse/ClickHouse/issues/65810): Fix invalid exceptions in function `parseDateTime` with `%F` and `%D` placeholders. [#65768](https://github.com/ClickHouse/ClickHouse/pull/65768) ([Antonio Andelic](https://github.com/antonio2368)).
* Backported in [#65931](https://github.com/ClickHouse/ClickHouse/issues/65931): For queries that read from `PostgreSQL`, cancel the internal `PostgreSQL` query if the ClickHouse query is finished. Otherwise, `ClickHouse` query cannot be canceled until the internal `PostgreSQL` query is finished. [#65771](https://github.com/ClickHouse/ClickHouse/pull/65771) ([Maksim Kita](https://github.com/kitaisreal)).
* Backported in [#65826](https://github.com/ClickHouse/ClickHouse/issues/65826): Fix a bug in short circuit logic when old analyzer and dictGetOrDefault is used. [#65802](https://github.com/ClickHouse/ClickHouse/pull/65802) ([jsc0218](https://github.com/jsc0218)).
* Backported in [#66299](https://github.com/ClickHouse/ClickHouse/issues/66299): Better handling of join conditions involving `IS NULL` checks (for example `ON (a = b AND (a IS NOT NULL) AND (b IS NOT NULL) ) OR ( (a IS NULL) AND (b IS NULL) )` is rewritten to `ON a <=> b`), fix incorrect optimization when condition other then `IS NULL` are present. [#65835](https://github.com/ClickHouse/ClickHouse/pull/65835) ([vdimir](https://github.com/vdimir)).
* Backported in [#66326](https://github.com/ClickHouse/ClickHouse/issues/66326): Add missing settings `input_format_csv_skip_first_lines/input_format_tsv_skip_first_lines/input_format_csv_try_infer_numbers_from_strings/input_format_csv_try_infer_strings_from_quoted_tuples` in schema inference cache because they can change the resulting schema. It prevents from incorrect result of schema inference with these settings changed. [#65980](https://github.com/ClickHouse/ClickHouse/pull/65980) ([Kruglov Pavel](https://github.com/Avogar)).
* Backported in [#66153](https://github.com/ClickHouse/ClickHouse/issues/66153): Fixed buffer overflow bug in `unbin`/`unhex` implementation. [#66106](https://github.com/ClickHouse/ClickHouse/pull/66106) ([Nikita Taranov](https://github.com/nickitat)).
* Backported in [#66459](https://github.com/ClickHouse/ClickHouse/issues/66459): Fixed a bug in ZooKeeper client: a session could get stuck in unusable state after receiving a hardware error from ZooKeeper. For example, this might happen due to "soft memory limit" in ClickHouse Keeper. [#66140](https://github.com/ClickHouse/ClickHouse/pull/66140) ([Alexander Tokmakov](https://github.com/tavplubix)).
* Backported in [#66224](https://github.com/ClickHouse/ClickHouse/issues/66224): Fix issue in SumIfToCountIfVisitor and signed integers. [#66146](https://github.com/ClickHouse/ClickHouse/pull/66146) ([Raúl Marín](https://github.com/Algunenano)).
* Backported in [#66267](https://github.com/ClickHouse/ClickHouse/issues/66267): Don't throw `TIMEOUT_EXCEEDED` for `none_only_active` mode of `distributed_ddl_output_mode`. [#66218](https://github.com/ClickHouse/ClickHouse/pull/66218) ([Alexander Tokmakov](https://github.com/tavplubix)).
* Backported in [#66678](https://github.com/ClickHouse/ClickHouse/issues/66678): Fix handling limit for `system.numbers_mt` when no index can be used. [#66231](https://github.com/ClickHouse/ClickHouse/pull/66231) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Backported in [#66603](https://github.com/ClickHouse/ClickHouse/issues/66603): Fixed how the ClickHouse server detects the maximum number of usable CPU cores as specified by cgroups v2 if the server runs in a container such as Docker. In more detail, containers often run their process in the root cgroup which has an empty name. In that case, ClickHouse ignored the CPU limits set by cgroups v2. [#66237](https://github.com/ClickHouse/ClickHouse/pull/66237) ([filimonov](https://github.com/filimonov)).
* Backported in [#66358](https://github.com/ClickHouse/ClickHouse/issues/66358): Fix the `Not-ready set` error when a subquery with `IN` is used in the constraint. [#66261](https://github.com/ClickHouse/ClickHouse/pull/66261) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Backported in [#66971](https://github.com/ClickHouse/ClickHouse/issues/66971): Fix `Column identifier is already registered` error with `group_by_use_nulls=true` and new analyzer. [#66400](https://github.com/ClickHouse/ClickHouse/pull/66400) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Backported in [#66968](https://github.com/ClickHouse/ClickHouse/issues/66968): Fix `Cannot find column` error for queries with constant expression in `GROUP BY` key and new analyzer enabled. [#66433](https://github.com/ClickHouse/ClickHouse/pull/66433) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Backported in [#66719](https://github.com/ClickHouse/ClickHouse/issues/66719): Correctly track memory for `Allocator::realloc`. [#66548](https://github.com/ClickHouse/ClickHouse/pull/66548) ([Antonio Andelic](https://github.com/antonio2368)).
* Backported in [#66950](https://github.com/ClickHouse/ClickHouse/issues/66950): Fix an invalid result for queries with `WINDOW`. This could happen when `PARTITION` columns have sparse serialization and window functions are executed in parallel. [#66579](https://github.com/ClickHouse/ClickHouse/pull/66579) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Backported in [#66947](https://github.com/ClickHouse/ClickHouse/issues/66947): Fix `Method getResultType is not supported for QUERY query node` error when scalar subquery was used as the first argument of IN (with new analyzer). [#66655](https://github.com/ClickHouse/ClickHouse/pull/66655) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Backported in [#67631](https://github.com/ClickHouse/ClickHouse/issues/67631): Fix for occasional deadlock in Context::getDDLWorker. [#66843](https://github.com/ClickHouse/ClickHouse/pull/66843) ([Alexander Gololobov](https://github.com/davenger)).
* Backported in [#67195](https://github.com/ClickHouse/ClickHouse/issues/67195): TRUNCATE DATABASE used to stop replication as if it was a DROP DATABASE query, it's fixed. [#67129](https://github.com/ClickHouse/ClickHouse/pull/67129) ([Alexander Tokmakov](https://github.com/tavplubix)).
* Backported in [#67377](https://github.com/ClickHouse/ClickHouse/issues/67377): Fix error `Cannot convert column because it is non constant in source stream but must be constant in result.` for a query that reads from the `Merge` table over the `Distriburted` table with one shard. [#67146](https://github.com/ClickHouse/ClickHouse/pull/67146) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Backported in [#67240](https://github.com/ClickHouse/ClickHouse/issues/67240): This closes [#67156](https://github.com/ClickHouse/ClickHouse/issues/67156). This closes [#66447](https://github.com/ClickHouse/ClickHouse/issues/66447). The bug was introduced in https://github.com/ClickHouse/ClickHouse/pull/62907. [#67178](https://github.com/ClickHouse/ClickHouse/pull/67178) ([Maksim Kita](https://github.com/kitaisreal)).
* Backported in [#67574](https://github.com/ClickHouse/ClickHouse/issues/67574): Fix execution of nested short-circuit functions. [#67520](https://github.com/ClickHouse/ClickHouse/pull/67520) ([Kruglov Pavel](https://github.com/Avogar)).
#### NOT FOR CHANGELOG / INSIGNIFICANT
* Backported in [#65410](https://github.com/ClickHouse/ClickHouse/issues/65410): Re-enable OpenSSL session caching. [#65111](https://github.com/ClickHouse/ClickHouse/pull/65111) ([Robert Schulze](https://github.com/rschu1ze)).
* Backported in [#65903](https://github.com/ClickHouse/ClickHouse/issues/65903): Fix bug with session closing in Keeper. [#65735](https://github.com/ClickHouse/ClickHouse/pull/65735) ([Antonio Andelic](https://github.com/antonio2368)).
* Backported in [#66385](https://github.com/ClickHouse/ClickHouse/issues/66385): Disable broken cases from 02911_join_on_nullsafe_optimization. [#66310](https://github.com/ClickHouse/ClickHouse/pull/66310) ([vdimir](https://github.com/vdimir)).
* Backported in [#66424](https://github.com/ClickHouse/ClickHouse/issues/66424): Ignore subquery for IN in DDLLoadingDependencyVisitor. [#66395](https://github.com/ClickHouse/ClickHouse/pull/66395) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Backported in [#66542](https://github.com/ClickHouse/ClickHouse/issues/66542): Add additional log masking in CI. [#66523](https://github.com/ClickHouse/ClickHouse/pull/66523) ([Raúl Marín](https://github.com/Algunenano)).
* Backported in [#66857](https://github.com/ClickHouse/ClickHouse/issues/66857): Fix data race in S3::ClientCache. [#66644](https://github.com/ClickHouse/ClickHouse/pull/66644) ([Konstantin Morozov](https://github.com/k-morozov)).
* Backported in [#66873](https://github.com/ClickHouse/ClickHouse/issues/66873): Support one more case in JOIN ON ... IS NULL. [#66725](https://github.com/ClickHouse/ClickHouse/pull/66725) ([vdimir](https://github.com/vdimir)).
* Backported in [#67057](https://github.com/ClickHouse/ClickHouse/issues/67057): Increase asio pool size in case the server is tiny. [#66761](https://github.com/ClickHouse/ClickHouse/pull/66761) ([alesapin](https://github.com/alesapin)).
* Backported in [#66944](https://github.com/ClickHouse/ClickHouse/issues/66944): Small fix in realloc memory tracking. [#66820](https://github.com/ClickHouse/ClickHouse/pull/66820) ([Antonio Andelic](https://github.com/antonio2368)).
* Backported in [#67250](https://github.com/ClickHouse/ClickHouse/issues/67250): Followup [#66725](https://github.com/ClickHouse/ClickHouse/issues/66725). [#66869](https://github.com/ClickHouse/ClickHouse/pull/66869) ([vdimir](https://github.com/vdimir)).
* Backported in [#67410](https://github.com/ClickHouse/ClickHouse/issues/67410): CI: Fix build results for release branches. [#67402](https://github.com/ClickHouse/ClickHouse/pull/67402) ([Max K.](https://github.com/maxknv)).

View File

@ -103,8 +103,6 @@ Default: 2
The policy on how to perform a scheduling for background merges and mutations. Possible values are: `round_robin` and `shortest_task_first`.
## background_merges_mutations_scheduling_policy
Algorithm used to select next merge or mutation to be executed by background thread pool. Policy may be changed at runtime without server restart.
Could be applied from the `default` profile for backward compatibility.

View File

@ -5608,3 +5608,9 @@ Default value: `10000000`.
Minimal size of block to compress in CROSS JOIN. Zero value means - disable this threshold. This block is compressed when any of the two thresholds (by rows or by bytes) are reached.
Default value: `1GiB`.
## disable_insertion_and_mutation
Disable all insert and mutations (alter table update / alter table delete / alter table drop partition). Set to true, can make this node focus on reading queries.
Default value: `false`.

View File

@ -166,6 +166,7 @@ namespace DB
M(Bool, prepare_system_log_tables_on_startup, false, "If true, ClickHouse creates all configured `system.*_log` tables before the startup. It can be helpful if some startup scripts depend on these tables.", 0) \
M(Double, gwp_asan_force_sample_probability, 0.0003, "Probability that an allocation from specific places will be sampled by GWP Asan (i.e. PODArray allocations)", 0) \
M(UInt64, config_reload_interval_ms, 2000, "How often clickhouse will reload config and check for new changes", 0) \
M(Bool, disable_insertion_and_mutation, false, "Disable all insert/alter/delete queries. This setting will be enabled if someone needs read-only nodes to prevent insertion and mutation affect reading performance.", 0)
/// If you add a setting which can be updated at runtime, please update 'changeable_settings' map in StorageSystemServerSettings.cpp

View File

@ -57,7 +57,30 @@ String ClickHouseVersion::toString() const
/// Note: please check if the key already exists to prevent duplicate entries.
static std::initializer_list<std::pair<ClickHouseVersion, SettingsChangesHistory::SettingsChanges>> settings_changes_history_initializer =
{
{"24.7", {{"output_format_parquet_write_page_index", false, true, "Add a possibility to write page index into parquet files."},
{"24.12",
{
}
},
{"24.11",
{
}
},
{"24.10",
{
}
},
{"24.9",
{
}
},
{"24.8",
{
{"merge_tree_min_bytes_per_task_for_remote_reading", 4194304, 2097152, "Value is unified with `filesystem_prefetch_min_bytes_for_single_read_task`"},
}
},
{"24.7",
{
{"output_format_parquet_write_page_index", false, true, "Add a possibility to write page index into parquet files."},
{"output_format_binary_encode_types_in_binary_format", false, false, "Added new setting to allow to write type names in binary format in RowBinaryWithNamesAndTypes output format"},
{"input_format_binary_decode_types_in_binary_format", false, false, "Added new setting to allow to read type names in binary format in RowBinaryWithNamesAndTypes input format"},
{"output_format_native_encode_types_in_binary_format", false, false, "Added new setting to allow to write type names in binary format in Native output format"},
@ -69,20 +92,21 @@ static std::initializer_list<std::pair<ClickHouseVersion, SettingsChangesHistory
{"dictionary_validate_primary_key_type", false, false, "Validate primary key type for dictionaries. By default id type for simple layouts will be implicitly converted to UInt64."},
{"collect_hash_table_stats_during_joins", false, true, "New setting."},
{"max_size_to_preallocate_for_joins", 0, 100'000'000, "New setting."},
{"input_format_orc_reader_time_zone_name", "GMT", "GMT", "The time zone name for ORC row reader, the default ORC row reader's time zone is GMT."},
{"lightweight_mutation_projection_mode", "throw", "throw", "When lightweight delete happens on a table with projection(s), the possible operations include throw the exception as projection exists, or drop all projection related to this table then do lightweight delete."},
{"input_format_orc_reader_time_zone_name", "GMT", "GMT", "The time zone name for ORC row reader, the default ORC row reader's time zone is GMT."}, {"lightweight_mutation_projection_mode", "throw", "throw", "When lightweight delete happens on a table with projection(s), the possible operations include throw the exception as projection exists, or drop all projection related to this table then do lightweight delete."},
{"database_replicated_allow_heavy_create", true, false, "Long-running DDL queries (CREATE AS SELECT and POPULATE) for Replicated database engine was forbidden"},
{"query_plan_merge_filters", false, false, "Allow to merge filters in the query plan"},
{"azure_sdk_max_retries", 10, 10, "Maximum number of retries in azure sdk"},
{"azure_sdk_retry_initial_backoff_ms", 10, 10, "Minimal backoff between retries in azure sdk"},
{"azure_sdk_retry_max_backoff_ms", 1000, 1000, "Maximal backoff between retries in azure sdk"},
{"merge_tree_min_bytes_per_task_for_remote_reading", 4194304, 2097152, "Value is unified with `filesystem_prefetch_min_bytes_for_single_read_task`"},
{"ignore_on_cluster_for_replicated_named_collections_queries", false, false, "Ignore ON CLUSTER clause for replicated named collections management queries."},
{"backup_restore_s3_retry_attempts", 1000,1000, "Setting for Aws::Client::RetryStrategy, Aws::Client does retries itself, 0 means no retries. It takes place only for backup/restore."},
{"postgresql_connection_attempt_timeout", 2, 2, "Allow to control 'connect_timeout' parameter of PostgreSQL connection."},
{"postgresql_connection_pool_retries", 2, 2, "Allow to control the number of retries in PostgreSQL connection pool."}
}},
{"24.6", {{"materialize_skip_indexes_on_insert", true, true, "Added new setting to allow to disable materialization of skip indexes on insert"},
}
},
{"24.6",
{
{"materialize_skip_indexes_on_insert", true, true, "Added new setting to allow to disable materialization of skip indexes on insert"},
{"materialize_statistics_on_insert", true, true, "Added new setting to allow to disable materialization of statistics on insert"},
{"input_format_parquet_use_native_reader", false, false, "When reading Parquet files, to use native reader instead of arrow reader."},
{"hdfs_throw_on_zero_files_match", false, false, "Allow to throw an error when ListObjects request cannot match any files in HDFS engine instead of empty query result"},
@ -111,8 +135,11 @@ static std::initializer_list<std::pair<ClickHouseVersion, SettingsChangesHistory
{"output_format_csv_serialize_tuple_into_separate_columns", true, true, "A new way of how interpret tuples in CSV format was added."},
{"input_format_csv_deserialize_separate_columns_into_tuple", true, true, "A new way of how interpret tuples in CSV format was added."},
{"input_format_csv_try_infer_strings_from_quoted_tuples", true, true, "A new way of how interpret tuples in CSV format was added."},
}},
{"24.5", {{"allow_deprecated_error_prone_window_functions", true, false, "Allow usage of deprecated error prone window functions (neighbor, runningAccumulate, runningDifferenceStartingWithFirstValue, runningDifference)"},
}
},
{"24.5",
{
{"allow_deprecated_error_prone_window_functions", true, false, "Allow usage of deprecated error prone window functions (neighbor, runningAccumulate, runningDifferenceStartingWithFirstValue, runningDifference)"},
{"allow_experimental_join_condition", false, false, "Support join with inequal conditions which involve columns from both left and right table. e.g. t1.y < t2.y."},
{"input_format_tsv_crlf_end_of_line", false, false, "Enables reading of CRLF line endings with TSV formats"},
{"output_format_parquet_use_custom_encoder", false, true, "Enable custom Parquet encoder."},
@ -124,8 +151,11 @@ static std::initializer_list<std::pair<ClickHouseVersion, SettingsChangesHistory
{"cast_string_to_dynamic_use_inference", false, false, "Add setting to allow converting String to Dynamic through parsing"},
{"allow_experimental_dynamic_type", false, false, "Add new experimental Dynamic type"},
{"azure_max_blocks_in_multipart_upload", 50000, 50000, "Maximum number of blocks in multipart upload for Azure."},
}},
{"24.4", {{"input_format_json_throw_on_bad_escape_sequence", true, true, "Allow to save JSON strings with bad escape sequences"},
}
},
{"24.4",
{
{"input_format_json_throw_on_bad_escape_sequence", true, true, "Allow to save JSON strings with bad escape sequences"},
{"max_parsing_threads", 0, 0, "Add a separate setting to control number of threads in parallel parsing from files"},
{"ignore_drop_queries_probability", 0, 0, "Allow to ignore drop queries in server with specified probability for testing purposes"},
{"lightweight_deletes_sync", 2, 2, "The same as 'mutation_sync', but controls only execution of lightweight deletes"},
@ -138,8 +168,11 @@ static std::initializer_list<std::pair<ClickHouseVersion, SettingsChangesHistory
{"azure_allow_parallel_part_upload", "true", "true", "Use multiple threads for azure multipart upload."},
{"max_recursive_cte_evaluation_depth", DBMS_RECURSIVE_CTE_MAX_EVALUATION_DEPTH, DBMS_RECURSIVE_CTE_MAX_EVALUATION_DEPTH, "Maximum limit on recursive CTE evaluation depth"},
{"query_plan_convert_outer_join_to_inner_join", false, true, "Allow to convert OUTER JOIN to INNER JOIN if filter after JOIN always filters default values"},
}},
{"24.3", {{"s3_connect_timeout_ms", 1000, 1000, "Introduce new dedicated setting for s3 connection timeout"},
}
},
{"24.3",
{
{"s3_connect_timeout_ms", 1000, 1000, "Introduce new dedicated setting for s3 connection timeout"},
{"allow_experimental_shared_merge_tree", false, true, "The setting is obsolete"},
{"use_page_cache_for_disks_without_file_cache", false, false, "Added userspace page cache"},
{"read_from_page_cache_if_exists_otherwise_bypass_cache", false, false, "Added userspace page cache"},
@ -181,8 +214,11 @@ static std::initializer_list<std::pair<ClickHouseVersion, SettingsChangesHistory
{"output_format_csv_serialize_tuple_into_separate_columns", true, true, "A new way of how interpret tuples in CSV format was added."},
{"input_format_csv_deserialize_separate_columns_into_tuple", true, true, "A new way of how interpret tuples in CSV format was added."},
{"input_format_csv_try_infer_strings_from_quoted_tuples", true, true, "A new way of how interpret tuples in CSV format was added."},
}},
{"24.2", {{"allow_suspicious_variant_types", true, false, "Don't allow creating Variant type with suspicious variants by default"},
}
},
{"24.2",
{
{"allow_suspicious_variant_types", true, false, "Don't allow creating Variant type with suspicious variants by default"},
{"validate_experimental_and_suspicious_types_inside_nested_types", false, true, "Validate usage of experimental and suspicious types inside nested types"},
{"output_format_values_escape_quote_with_quote", false, false, "If true escape ' with '', otherwise quoted with \\'"},
{"output_format_pretty_single_large_number_tip_threshold", 0, 1'000'000, "Print a readable number tip on the right side of the table if the block consists of a single number which exceeds this value (except 0)"},
@ -210,8 +246,11 @@ static std::initializer_list<std::pair<ClickHouseVersion, SettingsChangesHistory
{"default_normal_view_sql_security", "INVOKER", "INVOKER", "Allows to set default `SQL SECURITY` option while creating a normal view"},
{"mysql_map_string_to_text_in_show_columns", false, true, "Reduce the configuration effort to connect ClickHouse with BI tools."},
{"mysql_map_fixed_string_to_text_in_show_columns", false, true, "Reduce the configuration effort to connect ClickHouse with BI tools."},
}},
{"24.1", {{"print_pretty_type_names", false, true, "Better user experience."},
}
},
{"24.1",
{
{"print_pretty_type_names", false, true, "Better user experience."},
{"input_format_json_read_bools_as_strings", false, true, "Allow to read bools as strings in JSON formats by default"},
{"output_format_arrow_use_signed_indexes_for_dictionary", false, true, "Use signed indexes type for Arrow dictionaries by default as it's recommended"},
{"allow_experimental_variant_type", false, false, "Add new experimental Variant type"},
@ -233,89 +272,231 @@ static std::initializer_list<std::pair<ClickHouseVersion, SettingsChangesHistory
{"update_insert_deduplication_token_in_dependent_materialized_views", false, false, "Allow to update insert deduplication token with table identifier during insert in dependent materialized views"},
{"azure_max_unexpected_write_error_retries", 4, 4, "The maximum number of retries in case of unexpected errors during Azure blob storage write"},
{"split_parts_ranges_into_intersecting_and_non_intersecting_final", false, true, "Allow to split parts ranges into intersecting and non intersecting during FINAL optimization"},
{"split_intersecting_parts_ranges_into_layers_final", true, true, "Allow to split intersecting parts ranges into layers during FINAL optimization"}}},
{"23.12", {{"allow_suspicious_ttl_expressions", true, false, "It is a new setting, and in previous versions the behavior was equivalent to allowing."},
{"split_intersecting_parts_ranges_into_layers_final", true, true, "Allow to split intersecting parts ranges into layers during FINAL optimization"}
}
},
{"23.12",
{
{"allow_suspicious_ttl_expressions", true, false, "It is a new setting, and in previous versions the behavior was equivalent to allowing."},
{"input_format_parquet_allow_missing_columns", false, true, "Allow missing columns in Parquet files by default"},
{"input_format_orc_allow_missing_columns", false, true, "Allow missing columns in ORC files by default"},
{"input_format_arrow_allow_missing_columns", false, true, "Allow missing columns in Arrow files by default"}}},
{"23.11", {{"parsedatetime_parse_without_leading_zeros", false, true, "Improved compatibility with MySQL DATE_FORMAT/STR_TO_DATE"}}},
{"23.9", {{"optimize_group_by_constant_keys", false, true, "Optimize group by constant keys by default"},
{"input_format_arrow_allow_missing_columns", false, true, "Allow missing columns in Arrow files by default"}
}
},
{"23.11",
{
{"parsedatetime_parse_without_leading_zeros", false, true, "Improved compatibility with MySQL DATE_FORMAT/STR_TO_DATE"}
}
},
{"23.9",
{
{"optimize_group_by_constant_keys", false, true, "Optimize group by constant keys by default"},
{"input_format_json_try_infer_named_tuples_from_objects", false, true, "Try to infer named Tuples from JSON objects by default"},
{"input_format_json_read_numbers_as_strings", false, true, "Allow to read numbers as strings in JSON formats by default"},
{"input_format_json_read_arrays_as_strings", false, true, "Allow to read arrays as strings in JSON formats by default"},
{"input_format_json_infer_incomplete_types_as_strings", false, true, "Allow to infer incomplete types as Strings in JSON formats by default"},
{"input_format_json_try_infer_numbers_from_strings", true, false, "Don't infer numbers from strings in JSON formats by default to prevent possible parsing errors"},
{"http_write_exception_in_output_format", false, true, "Output valid JSON/XML on exception in HTTP streaming."}}},
{"23.8", {{"rewrite_count_distinct_if_with_count_distinct_implementation", false, true, "Rewrite countDistinctIf with count_distinct_implementation configuration"}}},
{"23.7", {{"function_sleep_max_microseconds_per_block", 0, 3000000, "In previous versions, the maximum sleep time of 3 seconds was applied only for `sleep`, but not for `sleepEachRow` function. In the new version, we introduce this setting. If you set compatibility with the previous versions, we will disable the limit altogether."}}},
{"23.6", {{"http_send_timeout", 180, 30, "3 minutes seems crazy long. Note that this is timeout for a single network write call, not for the whole upload operation."},
{"http_receive_timeout", 180, 30, "See http_send_timeout."}}},
{"23.5", {{"input_format_parquet_preserve_order", true, false, "Allow Parquet reader to reorder rows for better parallelism."},
{"http_write_exception_in_output_format", false, true, "Output valid JSON/XML on exception in HTTP streaming."}
}
},
{"23.8",
{
{"rewrite_count_distinct_if_with_count_distinct_implementation", false, true, "Rewrite countDistinctIf with count_distinct_implementation configuration"}
}
},
{"23.7",
{
{"function_sleep_max_microseconds_per_block", 0, 3000000, "In previous versions, the maximum sleep time of 3 seconds was applied only for `sleep`, but not for `sleepEachRow` function. In the new version, we introduce this setting. If you set compatibility with the previous versions, we will disable the limit altogether."}
}
},
{"23.6",
{
{"http_send_timeout", 180, 30, "3 minutes seems crazy long. Note that this is timeout for a single network write call, not for the whole upload operation."},
{"http_receive_timeout", 180, 30, "See http_send_timeout."}
}
},
{"23.5",
{
{"input_format_parquet_preserve_order", true, false, "Allow Parquet reader to reorder rows for better parallelism."},
{"parallelize_output_from_storages", false, true, "Allow parallelism when executing queries that read from file/url/s3/etc. This may reorder rows."},
{"use_with_fill_by_sorting_prefix", false, true, "Columns preceding WITH FILL columns in ORDER BY clause form sorting prefix. Rows with different values in sorting prefix are filled independently"},
{"output_format_parquet_compliant_nested_types", false, true, "Change an internal field name in output Parquet file schema."}}},
{"23.4", {{"allow_suspicious_indices", true, false, "If true, index can defined with identical expressions"},
{"output_format_parquet_compliant_nested_types", false, true, "Change an internal field name in output Parquet file schema."}
}
},
{"23.4",
{
{"allow_suspicious_indices", true, false, "If true, index can defined with identical expressions"},
{"allow_nonconst_timezone_arguments", true, false, "Allow non-const timezone arguments in certain time-related functions like toTimeZone(), fromUnixTimestamp*(), snowflakeToDateTime*()."},
{"connect_timeout_with_failover_ms", 50, 1000, "Increase default connect timeout because of async connect"},
{"connect_timeout_with_failover_secure_ms", 100, 1000, "Increase default secure connect timeout because of async connect"},
{"hedged_connection_timeout_ms", 100, 50, "Start new connection in hedged requests after 50 ms instead of 100 to correspond with previous connect timeout"},
{"formatdatetime_f_prints_single_zero", true, false, "Improved compatibility with MySQL DATE_FORMAT()/STR_TO_DATE()"},
{"formatdatetime_parsedatetime_m_is_month_name", false, true, "Improved compatibility with MySQL DATE_FORMAT/STR_TO_DATE"}}},
{"23.3", {{"output_format_parquet_version", "1.0", "2.latest", "Use latest Parquet format version for output format"},
{"formatdatetime_parsedatetime_m_is_month_name", false, true, "Improved compatibility with MySQL DATE_FORMAT/STR_TO_DATE"}
}
},
{"23.3",
{
{"output_format_parquet_version", "1.0", "2.latest", "Use latest Parquet format version for output format"},
{"input_format_json_ignore_unknown_keys_in_named_tuple", false, true, "Improve parsing JSON objects as named tuples"},
{"input_format_native_allow_types_conversion", false, true, "Allow types conversion in Native input forma"},
{"output_format_arrow_compression_method", "none", "lz4_frame", "Use lz4 compression in Arrow output format by default"},
{"output_format_parquet_compression_method", "snappy", "lz4", "Use lz4 compression in Parquet output format by default"},
{"output_format_orc_compression_method", "none", "lz4_frame", "Use lz4 compression in ORC output format by default"},
{"async_query_sending_for_remote", false, true, "Create connections and send query async across shards"}}},
{"23.2", {{"output_format_parquet_fixed_string_as_fixed_byte_array", false, true, "Use Parquet FIXED_LENGTH_BYTE_ARRAY type for FixedString by default"},
{"async_query_sending_for_remote", false, true, "Create connections and send query async across shards"}
}
},
{"23.2",
{
{"output_format_parquet_fixed_string_as_fixed_byte_array", false, true, "Use Parquet FIXED_LENGTH_BYTE_ARRAY type for FixedString by default"},
{"output_format_arrow_fixed_string_as_fixed_byte_array", false, true, "Use Arrow FIXED_SIZE_BINARY type for FixedString by default"},
{"query_plan_remove_redundant_distinct", false, true, "Remove redundant Distinct step in query plan"},
{"optimize_duplicate_order_by_and_distinct", true, false, "Remove duplicate ORDER BY and DISTINCT if it's possible"},
{"insert_keeper_max_retries", 0, 20, "Enable reconnections to Keeper on INSERT, improve reliability"}}},
{"23.1", {{"input_format_json_read_objects_as_strings", 0, 1, "Enable reading nested json objects as strings while object type is experimental"},
{"insert_keeper_max_retries", 0, 20, "Enable reconnections to Keeper on INSERT, improve reliability"}
}
},
{"23.1",
{
{"input_format_json_read_objects_as_strings", 0, 1, "Enable reading nested json objects as strings while object type is experimental"},
{"input_format_json_defaults_for_missing_elements_in_named_tuple", false, true, "Allow missing elements in JSON objects while reading named tuples by default"},
{"input_format_csv_detect_header", false, true, "Detect header in CSV format by default"},
{"input_format_tsv_detect_header", false, true, "Detect header in TSV format by default"},
{"input_format_custom_detect_header", false, true, "Detect header in CustomSeparated format by default"},
{"query_plan_remove_redundant_sorting", false, true, "Remove redundant sorting in query plan. For example, sorting steps related to ORDER BY clauses in subqueries"}}},
{"22.12", {{"max_size_to_preallocate_for_aggregation", 10'000'000, 100'000'000, "This optimizes performance"},
{"query_plan_remove_redundant_sorting", false, true, "Remove redundant sorting in query plan. For example, sorting steps related to ORDER BY clauses in subqueries"}
}
},
{"22.12",
{
{"max_size_to_preallocate_for_aggregation", 10'000'000, 100'000'000, "This optimizes performance"},
{"query_plan_aggregation_in_order", 0, 1, "Enable some refactoring around query plan"},
{"format_binary_max_string_size", 0, 1_GiB, "Prevent allocating large amount of memory"}}},
{"22.11", {{"use_structure_from_insertion_table_in_table_functions", 0, 2, "Improve using structure from insertion table in table functions"}}},
{"22.9", {{"force_grouping_standard_compatibility", false, true, "Make GROUPING function output the same as in SQL standard and other DBMS"}}},
{"22.7", {{"cross_to_inner_join_rewrite", 1, 2, "Force rewrite comma join to inner"},
{"format_binary_max_string_size", 0, 1_GiB, "Prevent allocating large amount of memory"}
}
},
{"22.11",
{
{"use_structure_from_insertion_table_in_table_functions", 0, 2, "Improve using structure from insertion table in table functions"}
}
},
{"22.9",
{
{"force_grouping_standard_compatibility", false, true, "Make GROUPING function output the same as in SQL standard and other DBMS"}
}
},
{"22.7",
{
{"cross_to_inner_join_rewrite", 1, 2, "Force rewrite comma join to inner"},
{"enable_positional_arguments", false, true, "Enable positional arguments feature by default"},
{"format_csv_allow_single_quotes", true, false, "Most tools don't treat single quote in CSV specially, don't do it by default too"}}},
{"22.6", {{"output_format_json_named_tuples_as_objects", false, true, "Allow to serialize named tuples as JSON objects in JSON formats by default"},
{"input_format_skip_unknown_fields", false, true, "Optimize reading subset of columns for some input formats"}}},
{"22.5", {{"memory_overcommit_ratio_denominator", 0, 1073741824, "Enable memory overcommit feature by default"},
{"memory_overcommit_ratio_denominator_for_user", 0, 1073741824, "Enable memory overcommit feature by default"}}},
{"22.4", {{"allow_settings_after_format_in_insert", true, false, "Do not allow SETTINGS after FORMAT for INSERT queries because ClickHouse interpret SETTINGS as some values, which is misleading"}}},
{"22.3", {{"cast_ipv4_ipv6_default_on_conversion_error", true, false, "Make functions cast(value, 'IPv4') and cast(value, 'IPv6') behave same as toIPv4 and toIPv6 functions"}}},
{"21.12", {{"stream_like_engine_allow_direct_select", true, false, "Do not allow direct select for Kafka/RabbitMQ/FileLog by default"}}},
{"21.9", {{"output_format_decimal_trailing_zeros", true, false, "Do not output trailing zeros in text representation of Decimal types by default for better looking output"},
{"use_hedged_requests", false, true, "Enable Hedged Requests feature by default"}}},
{"21.7", {{"legacy_column_name_of_tuple_literal", true, false, "Add this setting only for compatibility reasons. It makes sense to set to 'true', while doing rolling update of cluster from version lower than 21.7 to higher"}}},
{"21.5", {{"async_socket_for_remote", false, true, "Fix all problems and turn on asynchronous reads from socket for remote queries by default again"}}},
{"21.3", {{"async_socket_for_remote", true, false, "Turn off asynchronous reads from socket for remote queries because of some problems"},
{"format_csv_allow_single_quotes", true, false, "Most tools don't treat single quote in CSV specially, don't do it by default too"}
}
},
{"22.6",
{
{"output_format_json_named_tuples_as_objects", false, true, "Allow to serialize named tuples as JSON objects in JSON formats by default"},
{"input_format_skip_unknown_fields", false, true, "Optimize reading subset of columns for some input formats"}
}
},
{"22.5",
{
{"memory_overcommit_ratio_denominator", 0, 1073741824, "Enable memory overcommit feature by default"},
{"memory_overcommit_ratio_denominator_for_user", 0, 1073741824, "Enable memory overcommit feature by default"}
}
},
{"22.4",
{
{"allow_settings_after_format_in_insert", true, false, "Do not allow SETTINGS after FORMAT for INSERT queries because ClickHouse interpret SETTINGS as some values, which is misleading"}
}
},
{"22.3",
{
{"cast_ipv4_ipv6_default_on_conversion_error", true, false, "Make functions cast(value, 'IPv4') and cast(value, 'IPv6') behave same as toIPv4 and toIPv6 functions"}
}
},
{"21.12",
{
{"stream_like_engine_allow_direct_select", true, false, "Do not allow direct select for Kafka/RabbitMQ/FileLog by default"}
}
},
{"21.9",
{
{"output_format_decimal_trailing_zeros", true, false, "Do not output trailing zeros in text representation of Decimal types by default for better looking output"},
{"use_hedged_requests", false, true, "Enable Hedged Requests feature by default"}
}
},
{"21.7",
{
{"legacy_column_name_of_tuple_literal", true, false, "Add this setting only for compatibility reasons. It makes sense to set to 'true', while doing rolling update of cluster from version lower than 21.7 to higher"}
}
},
{"21.5",
{
{"async_socket_for_remote", false, true, "Fix all problems and turn on asynchronous reads from socket for remote queries by default again"}
}
},
{"21.3",
{
{"async_socket_for_remote", true, false, "Turn off asynchronous reads from socket for remote queries because of some problems"},
{"optimize_normalize_count_variants", false, true, "Rewrite aggregate functions that semantically equals to count() as count() by default"},
{"normalize_function_names", false, true, "Normalize function names to their canonical names, this was needed for projection query routing"}}},
{"21.2", {{"enable_global_with_statement", false, true, "Propagate WITH statements to UNION queries and all subqueries by default"}}},
{"21.1", {{"insert_quorum_parallel", false, true, "Use parallel quorum inserts by default. It is significantly more convenient to use than sequential quorum inserts"},
{"normalize_function_names", false, true, "Normalize function names to their canonical names, this was needed for projection query routing"}
}
},
{"21.2",
{
{"enable_global_with_statement", false, true, "Propagate WITH statements to UNION queries and all subqueries by default"}
}
},
{"21.1",
{
{"insert_quorum_parallel", false, true, "Use parallel quorum inserts by default. It is significantly more convenient to use than sequential quorum inserts"},
{"input_format_null_as_default", false, true, "Allow to insert NULL as default for input formats by default"},
{"optimize_on_insert", false, true, "Enable data optimization on INSERT by default for better user experience"},
{"use_compact_format_in_distributed_parts_names", false, true, "Use compact format for async INSERT into Distributed tables by default"}}},
{"20.10", {{"format_regexp_escaping_rule", "Escaped", "Raw", "Use Raw as default escaping rule for Regexp format to male the behaviour more like to what users expect"}}},
{"20.7", {{"show_table_uuid_in_table_create_query_if_not_nil", true, false, "Stop showing UID of the table in its CREATE query for Engine=Atomic"}}},
{"20.5", {{"input_format_with_names_use_header", false, true, "Enable using header with names for formats with WithNames/WithNamesAndTypes suffixes"},
{"allow_suspicious_codecs", true, false, "Don't allow to specify meaningless compression codecs"}}},
{"20.4", {{"validate_polygons", false, true, "Throw exception if polygon is invalid in function pointInPolygon by default instead of returning possibly wrong results"}}},
{"19.18", {{"enable_scalar_subquery_optimization", false, true, "Prevent scalar subqueries from (de)serializing large scalar values and possibly avoid running the same subquery more than once"}}},
{"19.14", {{"any_join_distinct_right_table_keys", true, false, "Disable ANY RIGHT and ANY FULL JOINs by default to avoid inconsistency"}}},
{"19.12", {{"input_format_defaults_for_omitted_fields", false, true, "Enable calculation of complex default expressions for omitted fields for some input formats, because it should be the expected behaviour"}}},
{"19.5", {{"max_partitions_per_insert_block", 0, 100, "Add a limit for the number of partitions in one block"}}},
{"18.12.17", {{"enable_optimize_predicate_expression", 0, 1, "Optimize predicates to subqueries by default"}}},
{"use_compact_format_in_distributed_parts_names", false, true, "Use compact format for async INSERT into Distributed tables by default"}
}
},
{"20.10",
{
{"format_regexp_escaping_rule", "Escaped", "Raw", "Use Raw as default escaping rule for Regexp format to male the behaviour more like to what users expect"}
}
},
{"20.7",
{
{"show_table_uuid_in_table_create_query_if_not_nil", true, false, "Stop showing UID of the table in its CREATE query for Engine=Atomic"}
}
},
{"20.5",
{
{"input_format_with_names_use_header", false, true, "Enable using header with names for formats with WithNames/WithNamesAndTypes suffixes"},
{"allow_suspicious_codecs", true, false, "Don't allow to specify meaningless compression codecs"}
}
},
{"20.4",
{
{"validate_polygons", false, true, "Throw exception if polygon is invalid in function pointInPolygon by default instead of returning possibly wrong results"}
}
},
{"19.18",
{
{"enable_scalar_subquery_optimization", false, true, "Prevent scalar subqueries from (de)serializing large scalar values and possibly avoid running the same subquery more than once"}
}
},
{"19.14",
{
{"any_join_distinct_right_table_keys", true, false, "Disable ANY RIGHT and ANY FULL JOINs by default to avoid inconsistency"}
}
},
{"19.12",
{
{"input_format_defaults_for_omitted_fields", false, true, "Enable calculation of complex default expressions for omitted fields for some input formats, because it should be the expected behaviour"}
}
},
{"19.5",
{
{"max_partitions_per_insert_block", 0, 100, "Add a limit for the number of partitions in one block"}
}
},
{"18.12.17",
{
{"enable_optimize_predicate_expression", 0, 1, "Optimize predicates to subqueries by default"}
}
},
};

View File

@ -3494,9 +3494,15 @@ DDLWorker & Context::getDDLWorker() const
if (shared->ddl_worker_startup_task)
waitLoad(shared->ddl_worker_startup_task); // Just wait and do not prioritize, because it depends on all load and startup tasks
SharedLockGuard lock(shared->mutex);
if (!shared->ddl_worker)
{
/// Only acquire the lock for reading ddl_worker field.
/// hasZooKeeper() and hasDistributedDDL() acquire the same lock as well and double acquisition of the lock in shared mode can lead
/// to a deadlock if an exclusive lock attempt is made in the meantime by another thread.
SharedLockGuard lock(shared->mutex);
if (shared->ddl_worker)
return *shared->ddl_worker;
}
if (!hasZooKeeper())
throw Exception(ErrorCodes::NO_ELEMENTS_IN_CONFIG, "There is no Zookeeper configuration in server config");
@ -3505,8 +3511,6 @@ DDLWorker & Context::getDDLWorker() const
throw Exception(ErrorCodes::NO_ELEMENTS_IN_CONFIG, "DDL background thread is not initialized");
}
return *shared->ddl_worker;
}
zkutil::ZooKeeperPtr Context::getZooKeeper() const
{

View File

@ -1407,7 +1407,10 @@ void DatabaseCatalog::waitTableFinallyDropped(const UUID & uuid)
});
/// TSA doesn't support unique_lock
if (TSA_SUPPRESS_WARNING_FOR_READ(tables_marked_dropped_ids).contains(uuid))
const bool has_table = TSA_SUPPRESS_WARNING_FOR_READ(tables_marked_dropped_ids).contains(uuid);
LOG_DEBUG(log, "Done waiting for the table {} to be dropped. The outcome: {}", toString(uuid), has_table ? "table still exists" : "table dropped successfully");
if (has_table)
throw Exception(ErrorCodes::UNFINISHED, "Did not finish dropping the table with UUID {} because the server is shutting down, "
"will finish after restart", uuid);
}

View File

@ -5,6 +5,7 @@
#include <Access/Common/AccessRightsElement.h>
#include <Common/typeid_cast.h>
#include <Core/Settings.h>
#include <Core/ServerSettings.h>
#include <Databases/DatabaseFactory.h>
#include <Databases/DatabaseReplicated.h>
#include <Databases/IDatabase.h>
@ -47,6 +48,7 @@ namespace ErrorCodes
extern const int BAD_ARGUMENTS;
extern const int UNKNOWN_TABLE;
extern const int UNKNOWN_DATABASE;
extern const int QUERY_IS_PROHIBITED;
}
@ -191,6 +193,12 @@ BlockIO InterpreterAlterQuery::executeToTable(const ASTAlterQuery & alter)
"to execute ALTERs of different types (replicated and non replicated) in single query");
}
if (mutation_commands.hasNonEmptyMutationCommands() || !partition_commands.empty())
{
if (getContext()->getServerSettings().disable_insertion_and_mutation)
throw Exception(ErrorCodes::QUERY_IS_PROHIBITED, "Mutations are prohibited");
}
if (!alter_commands.empty())
{
auto alter_lock = table->lockForAlter(getContext()->getSettingsRef().lock_acquire_timeout);

View File

@ -3,6 +3,7 @@
#include <Access/ContextAccess.h>
#include <Core/Settings.h>
#include <Core/ServerSettings.h>
#include <Databases/DatabaseReplicated.h>
#include <Databases/IDatabase.h>
#include <Interpreters/Context.h>
@ -27,6 +28,7 @@ namespace ErrorCodes
extern const int SUPPORT_IS_DISABLED;
extern const int BAD_ARGUMENTS;
extern const int NOT_IMPLEMENTED;
extern const int QUERY_IS_PROHIBITED;
}
@ -51,6 +53,9 @@ BlockIO InterpreterDeleteQuery::execute()
if (table->isStaticStorage())
throw Exception(ErrorCodes::TABLE_IS_READ_ONLY, "Table is read-only");
if (getContext()->getGlobalContext()->getServerSettings().disable_insertion_and_mutation)
throw Exception(ErrorCodes::QUERY_IS_PROHIBITED, "Delete queries are prohibited");
DatabasePtr database = DatabaseCatalog::instance().getDatabase(table_id.database_name);
if (database->shouldReplicateQuery(getContext(), query_ptr))
{

View File

@ -6,6 +6,7 @@
#include <AggregateFunctions/AggregateFunctionFactory.h>
#include <Columns/ColumnNullable.h>
#include <Core/Settings.h>
#include <Core/ServerSettings.h>
#include <Processors/Transforms/buildPushingToViewsChain.h>
#include <DataTypes/DataTypeNullable.h>
#include <Interpreters/DatabaseCatalog.h>
@ -60,6 +61,7 @@ namespace ErrorCodes
extern const int NO_SUCH_COLUMN_IN_TABLE;
extern const int ILLEGAL_COLUMN;
extern const int DUPLICATE_COLUMN;
extern const int QUERY_IS_PROHIBITED;
}
InterpreterInsertQuery::InterpreterInsertQuery(
@ -732,6 +734,9 @@ BlockIO InterpreterInsertQuery::execute()
const Settings & settings = getContext()->getSettingsRef();
auto & query = query_ptr->as<ASTInsertQuery &>();
if (getContext()->getServerSettings().disable_insertion_and_mutation
&& query.table_id.database_name != DatabaseCatalog::SYSTEM_DATABASE)
throw Exception(ErrorCodes::QUERY_IS_PROHIBITED, "Insert queries are prohibited");
StoragePtr table = getTable(query);
checkStorageSupportsTransactionsIfNeeded(table, getContext());

View File

@ -5557,12 +5557,16 @@ public:
auto it = temp_part_dirs.find(part_name);
if (it == temp_part_dirs.end())
{
auto temp_part_dir = std::make_shared<TemporaryFileOnDisk>(disk, fs::path{storage->getRelativeDataPath()} / ("tmp_restore_" + part_name + "-"));
auto temp_dir_deleter = std::make_unique<TemporaryFileOnDisk>(disk, fs::path{storage->getRelativeDataPath()} / ("tmp_restore_" + part_name + "-"));
auto temp_part_dir = fs::path{temp_dir_deleter->getRelativePath()}.filename();
/// Attaching parts will rename them so it's expected for a temporary part directory not to exist anymore in the end.
temp_part_dir->setShowWarningIfRemoved(false);
it = temp_part_dirs.emplace(part_name, temp_part_dir).first;
temp_dir_deleter->setShowWarningIfRemoved(false);
/// The following holder is needed to prevent clearOldTemporaryDirectories() from clearing `temp_part_dir` before we attach the part.
auto temp_dir_holder = storage->getTemporaryPartDirectoryHolder(temp_part_dir);
it = temp_part_dirs.emplace(part_name,
std::make_pair(std::move(temp_dir_deleter), std::move(temp_dir_holder))).first;
}
return it->second->getRelativePath();
return it->second.first->getRelativePath();
}
private:
@ -5588,7 +5592,7 @@ private:
size_t num_parts = 0;
size_t num_broken_parts = 0;
MutableDataPartsVector parts;
std::map<String /* part_name*/, std::shared_ptr<TemporaryFileOnDisk>> temp_part_dirs;
std::map<String /* part_name*/, std::pair<std::unique_ptr<TemporaryFileOnDisk>, scope_guard>> temp_part_dirs;
mutable std::mutex mutex;
};

View File

@ -43,6 +43,7 @@
#include <Common/ZooKeeper/Types.h>
#include <Common/ZooKeeper/ZooKeeper.h>
#include <Common/ZooKeeper/ZooKeeperConstants.h>
#include <Common/ZooKeeper/ZooKeeperRetries.h>
#include <Backups/BackupEntriesCollector.h>
#include <Backups/IBackupCoordination.h>
@ -78,6 +79,7 @@ namespace ErrorCodes
extern const int LOGICAL_ERROR;
extern const int LIMIT_EXCEEDED;
extern const int CANNOT_RESTORE_TABLE;
extern const int INVALID_STATE;
}
namespace
@ -120,7 +122,7 @@ public:
: SinkToStorage(header), storage(storage_), context(std::move(context_))
{
auto primary_key = storage.getPrimaryKey();
assert(primary_key.size() == 1);
chassert(primary_key.size() == 1);
primary_key_pos = getHeader().getPositionByName(primary_key[0]);
}
@ -171,8 +173,20 @@ public:
template <bool for_update>
void finalize(bool strict)
{
auto zookeeper = storage.getClient();
const auto & settings = context->getSettingsRef();
ZooKeeperRetriesControl zk_retry{
getName(),
getLogger(getName()),
ZooKeeperRetriesInfo{
settings.insert_keeper_max_retries,
settings.insert_keeper_retry_initial_backoff_ms,
settings.insert_keeper_retry_max_backoff_ms},
context->getProcessListElement()};
zk_retry.retryLoop([&]()
{
auto zookeeper = storage.getClient();
auto keys_limit = storage.keysLimit();
size_t current_keys_num = 0;
@ -241,11 +255,12 @@ public:
}
zookeeper->multi(requests, /* check_session_valid */ true);
});
}
};
template <typename KeyContainer>
class StorageKeeperMapSource : public ISource
class StorageKeeperMapSource : public ISource, WithContext
{
const StorageKeeperMap & storage;
size_t max_block_size;
@ -276,8 +291,15 @@ public:
KeyContainerPtr container_,
KeyContainerIter begin_,
KeyContainerIter end_,
bool with_version_column_)
: ISource(getHeader(header, with_version_column_)), storage(storage_), max_block_size(max_block_size_), container(std::move(container_)), it(begin_), end(end_)
bool with_version_column_,
ContextPtr context_)
: ISource(getHeader(header, with_version_column_))
, WithContext(std::move(context_))
, storage(storage_)
, max_block_size(max_block_size_)
, container(std::move(container_))
, it(begin_)
, end(end_)
, with_version_column(with_version_column_)
{
}
@ -302,12 +324,12 @@ public:
for (auto & raw_key : raw_keys)
raw_key = base64Encode(raw_key, /* url_encoding */ true);
return storage.getBySerializedKeys(raw_keys, nullptr, with_version_column);
return storage.getBySerializedKeys(raw_keys, nullptr, with_version_column, getContext());
}
else
{
size_t elem_num = std::min(max_block_size, static_cast<size_t>(end - it));
auto chunk = storage.getBySerializedKeys(std::span{it, it + elem_num}, nullptr, with_version_column);
auto chunk = storage.getBySerializedKeys(std::span{it, it + elem_num}, nullptr, with_version_column, getContext());
it += elem_num;
return chunk;
}
@ -386,10 +408,20 @@ StorageKeeperMap::StorageKeeperMap(
if (attach)
{
checkTable<false>();
checkTable<false>(context_);
return;
}
const auto & settings = context_->getSettingsRef();
ZooKeeperRetriesControl zk_retry{
getName(),
getLogger(getName()),
ZooKeeperRetriesInfo{settings.keeper_max_retries, settings.keeper_retry_initial_backoff_ms, settings.keeper_retry_max_backoff_ms},
context_->getProcessListElement()};
zk_retry.retryLoop(
[&]
{
auto client = getClient();
if (zk_root_path != "/" && !client->exists(zk_root_path))
@ -398,9 +430,17 @@ StorageKeeperMap::StorageKeeperMap(
client->createAncestors(zk_root_path);
client->createIfNotExists(zk_root_path, "");
}
});
std::shared_ptr<zkutil::EphemeralNodeHolder> metadata_drop_lock;
int32_t drop_lock_version = -1;
for (size_t i = 0; i < 1000; ++i)
{
bool success = false;
zk_retry.retryLoop(
[&]
{
auto client = getClient();
std::string stored_metadata_string;
auto exists = client->tryGet(zk_metadata_path, stored_metadata_string);
@ -421,10 +461,21 @@ StorageKeeperMap::StorageKeeperMap(
/// We still don't know if the table matches the expected metadata so table_is_valid is not changed
/// It will be checked lazily on the first operation
if (code == Coordination::Error::ZOK)
{
success = true;
return;
}
/// We most likely created the path but got a timeout or disconnect
if (code == Coordination::Error::ZNODEEXISTS && zk_retry.isRetry())
{
success = true;
return;
}
if (code != Coordination::Error::ZNONODE)
throw zkutil::KeeperException(code, "Failed to create table on path {} because a table with same UUID already exists", zk_root_path);
throw zkutil::KeeperException(
code, "Failed to create table on path {} because a table with same UUID already exists", zk_root_path);
/// ZNONODE means we dropped zk_tables_path but didn't finish drop completely
}
@ -432,6 +483,52 @@ StorageKeeperMap::StorageKeeperMap(
if (client->exists(zk_dropped_path))
{
LOG_INFO(log, "Removing leftover nodes");
bool drop_finished = false;
if (zk_retry.isRetry() && metadata_drop_lock != nullptr && drop_lock_version != -1)
{
/// if we have leftover lock from previous try, we need to recreate the ephemeral with our session
Coordination::Requests drop_lock_requests{
zkutil::makeRemoveRequest(zk_dropped_lock_path, drop_lock_version),
zkutil::makeCreateRequest(zk_dropped_lock_path, "", zkutil::CreateMode::Ephemeral),
};
Coordination::Responses drop_lock_responses;
auto lock_code = client->tryMulti(drop_lock_requests, drop_lock_responses);
if (lock_code == Coordination::Error::ZBADVERSION)
{
LOG_INFO(log, "Someone else is removing leftover nodes");
metadata_drop_lock->setAlreadyRemoved();
metadata_drop_lock.reset();
return;
}
if (drop_lock_responses[0]->error == Coordination::Error::ZNONODE)
{
/// someone else removed metadata nodes or the previous ephemeral node expired
/// we will try creating dropped lock again to make sure
metadata_drop_lock->setAlreadyRemoved();
metadata_drop_lock.reset();
}
else if (lock_code == Coordination::Error::ZOK)
{
metadata_drop_lock->setAlreadyRemoved();
metadata_drop_lock = zkutil::EphemeralNodeHolder::existing(zk_dropped_lock_path, *client);
drop_lock_version = -1;
Coordination::Stat lock_stat;
client->get(zk_dropped_lock_path, &lock_stat);
drop_lock_version = lock_stat.version;
if (!dropTable(client, metadata_drop_lock))
{
metadata_drop_lock.reset();
return;
}
drop_finished = true;
}
}
if (!drop_finished)
{
auto code = client->tryCreate(zk_dropped_lock_path, "", zkutil::CreateMode::Ephemeral);
if (code == Coordination::Error::ZNONODE)
@ -441,7 +538,7 @@ StorageKeeperMap::StorageKeeperMap(
else if (code == Coordination::Error::ZNODEEXISTS)
{
LOG_INFO(log, "Someone else is removing leftover nodes");
continue;
return;
}
else if (code != Coordination::Error::ZOK)
{
@ -449,14 +546,21 @@ StorageKeeperMap::StorageKeeperMap(
}
else
{
auto metadata_drop_lock = zkutil::EphemeralNodeHolder::existing(zk_dropped_lock_path, *client);
metadata_drop_lock = zkutil::EphemeralNodeHolder::existing(zk_dropped_lock_path, *client);
drop_lock_version = -1;
Coordination::Stat lock_stat;
client->get(zk_dropped_lock_path, &lock_stat);
drop_lock_version = lock_stat.version;
if (!dropTable(client, metadata_drop_lock))
continue;
{
metadata_drop_lock.reset();
return;
}
}
}
}
Coordination::Requests create_requests
{
Coordination::Requests create_requests{
zkutil::makeCreateRequest(zk_metadata_path, metadata_string, zkutil::CreateMode::Persistent),
zkutil::makeCreateRequest(zk_data_path, metadata_string, zkutil::CreateMode::Persistent),
zkutil::makeCreateRequest(zk_tables_path, "", zkutil::CreateMode::Persistent),
@ -467,23 +571,29 @@ StorageKeeperMap::StorageKeeperMap(
auto code = client->tryMulti(create_requests, create_responses);
if (code == Coordination::Error::ZNODEEXISTS)
{
LOG_INFO(log, "It looks like a table on path {} was created by another server at the same moment, will retry", zk_root_path);
continue;
LOG_INFO(
log, "It looks like a table on path {} was created by another server at the same moment, will retry", zk_root_path);
return;
}
else if (code != Coordination::Error::ZOK)
{
zkutil::KeeperMultiException::check(code, create_requests, create_responses);
}
table_is_valid = true;
table_status = TableStatus::VALID;
/// we are the first table created for the specified Keeper path, i.e. we are the first replica
success = true;
});
if (success)
return;
}
throw Exception(ErrorCodes::BAD_ARGUMENTS,
throw Exception(
ErrorCodes::BAD_ARGUMENTS,
"Cannot create metadata for table, because it is removed concurrently or because "
"of wrong zk_root_path ({})", zk_root_path);
"of wrong zk_root_path ({})",
zk_root_path);
}
@ -496,7 +606,7 @@ Pipe StorageKeeperMap::read(
size_t max_block_size,
size_t num_streams)
{
checkTable<true>();
checkTable<true>(context_);
storage_snapshot->check(column_names);
FieldVectorPtr filtered_keys;
@ -529,8 +639,8 @@ Pipe StorageKeeperMap::read(
size_t num_keys = keys->size();
size_t num_threads = std::min<size_t>(num_streams, keys->size());
assert(num_keys <= std::numeric_limits<uint32_t>::max());
assert(num_threads <= std::numeric_limits<uint32_t>::max());
chassert(num_keys <= std::numeric_limits<uint32_t>::max());
chassert(num_threads <= std::numeric_limits<uint32_t>::max());
for (size_t thread_idx = 0; thread_idx < num_threads; ++thread_idx)
{
@ -539,29 +649,59 @@ Pipe StorageKeeperMap::read(
using KeyContainer = typename KeyContainerPtr::element_type;
pipes.emplace_back(std::make_shared<StorageKeeperMapSource<KeyContainer>>(
*this, sample_block, max_block_size, keys, keys->begin() + begin, keys->begin() + end, with_version_column));
*this, sample_block, max_block_size, keys, keys->begin() + begin, keys->begin() + end, with_version_column, context_));
}
return Pipe::unitePipes(std::move(pipes));
};
auto client = getClient();
if (all_scan)
return process_keys(std::make_shared<std::vector<std::string>>(client->getChildren(zk_data_path)));
{
const auto & settings = context_->getSettingsRef();
ZooKeeperRetriesControl zk_retry{
getName(),
getLogger(getName()),
ZooKeeperRetriesInfo{
settings.keeper_max_retries,
settings.keeper_retry_initial_backoff_ms,
settings.keeper_retry_max_backoff_ms},
context_->getProcessListElement()};
std::vector<std::string> children;
zk_retry.retryLoop([&]
{
auto client = getClient();
children = client->getChildren(zk_data_path);
});
return process_keys(std::make_shared<std::vector<std::string>>(std::move(children)));
}
return process_keys(std::move(filtered_keys));
}
SinkToStoragePtr StorageKeeperMap::write(const ASTPtr & /*query*/, const StorageMetadataPtr & metadata_snapshot, ContextPtr local_context, bool /*async_insert*/)
{
checkTable<true>();
checkTable<true>(local_context);
return std::make_shared<StorageKeeperMapSink>(*this, metadata_snapshot->getSampleBlock(), local_context);
}
void StorageKeeperMap::truncate(const ASTPtr &, const StorageMetadataPtr &, ContextPtr, TableExclusiveLockHolder &)
void StorageKeeperMap::truncate(const ASTPtr &, const StorageMetadataPtr &, ContextPtr local_context, TableExclusiveLockHolder &)
{
checkTable<true>(local_context);
const auto & settings = local_context->getSettingsRef();
ZooKeeperRetriesControl zk_retry{
getName(),
getLogger(getName()),
ZooKeeperRetriesInfo{
settings.keeper_max_retries,
settings.keeper_retry_initial_backoff_ms,
settings.keeper_retry_max_backoff_ms},
local_context->getProcessListElement()};
zk_retry.retryLoop([&]
{
checkTable<true>();
auto client = getClient();
client->tryRemoveChildrenRecursive(zk_data_path, true);
});
}
bool StorageKeeperMap::dropTable(zkutil::ZooKeeperPtr zookeeper, const zkutil::EphemeralNodeHolder::Ptr & metadata_drop_lock)
@ -605,7 +745,18 @@ bool StorageKeeperMap::dropTable(zkutil::ZooKeeperPtr zookeeper, const zkutil::E
void StorageKeeperMap::drop()
{
checkTable<true>();
auto current_table_status = getTableStatus(getContext());
if (current_table_status == TableStatus::UNKNOWN)
{
static constexpr auto error_msg = "Failed to activate table because of connection issues. It will be activated "
"once a connection is established and metadata is verified";
throw Exception(ErrorCodes::INVALID_STATE, error_msg);
}
/// if only column metadata is wrong we can still drop the table correctly
if (current_table_status == TableStatus::INVALID_METADATA)
return;
auto client = getClient();
// we allow ZNONODE in case we got hardware error on previous drop
@ -966,15 +1117,27 @@ UInt64 StorageKeeperMap::keysLimit() const
return keys_limit;
}
std::optional<bool> StorageKeeperMap::isTableValid() const
StorageKeeperMap::TableStatus StorageKeeperMap::getTableStatus(const ContextPtr & local_context) const
{
std::lock_guard lock{init_mutex};
if (table_is_valid.has_value())
return table_is_valid;
if (table_status != TableStatus::UNKNOWN)
return table_status;
[&]
{
try
{
const auto & settings = local_context->getSettingsRef();
ZooKeeperRetriesControl zk_retry{
getName(),
getLogger(getName()),
ZooKeeperRetriesInfo{
settings.keeper_max_retries,
settings.keeper_retry_initial_backoff_ms,
settings.keeper_retry_max_backoff_ms},
local_context->getProcessListElement()};
zk_retry.retryLoop([&]
{
auto client = getClient();
@ -983,7 +1146,7 @@ std::optional<bool> StorageKeeperMap::isTableValid() const
if (metadata_stat.numChildren == 0)
{
table_is_valid = false;
table_status = TableStatus::INVALID_KEEPER_STRUCTURE;
return;
}
@ -994,7 +1157,7 @@ std::optional<bool> StorageKeeperMap::isTableValid() const
"Table definition does not match to the one stored in the path {}. Stored definition: {}",
zk_root_path,
stored_metadata_string);
table_is_valid = false;
table_status = TableStatus::INVALID_METADATA;
return;
}
@ -1007,7 +1170,7 @@ std::optional<bool> StorageKeeperMap::isTableValid() const
Coordination::Responses responses;
client->tryMulti(requests, responses);
table_is_valid = false;
table_status = TableStatus::INVALID_KEEPER_STRUCTURE;
if (responses[0]->error != Coordination::Error::ZOK)
{
LOG_ERROR(log, "Table node ({}) is missing", zk_table_path);
@ -1026,18 +1189,19 @@ std::optional<bool> StorageKeeperMap::isTableValid() const
return;
}
table_is_valid = true;
table_status = TableStatus::VALID;
});
}
catch (const Coordination::Exception & e)
{
tryLogCurrentException(log);
if (!Coordination::isHardwareError(e.code))
table_is_valid = false;
table_status = TableStatus::INVALID_KEEPER_STRUCTURE;
}
}();
return table_is_valid;
return table_status;
}
Chunk StorageKeeperMap::getByKeys(const ColumnsWithTypeAndName & keys, PaddedPODArray<UInt8> & null_map, const Names &) const
@ -1050,10 +1214,11 @@ Chunk StorageKeeperMap::getByKeys(const ColumnsWithTypeAndName & keys, PaddedPOD
if (raw_keys.size() != keys[0].column->size())
throw Exception(ErrorCodes::LOGICAL_ERROR, "Assertion failed: {} != {}", raw_keys.size(), keys[0].column->size());
return getBySerializedKeys(raw_keys, &null_map, /* version_column */ false);
return getBySerializedKeys(raw_keys, &null_map, /* version_column */ false, getContext());
}
Chunk StorageKeeperMap::getBySerializedKeys(const std::span<const std::string> keys, PaddedPODArray<UInt8> * null_map, bool with_version) const
Chunk StorageKeeperMap::getBySerializedKeys(
const std::span<const std::string> keys, PaddedPODArray<UInt8> * null_map, bool with_version, const ContextPtr & local_context) const
{
Block sample_block = getInMemoryMetadataPtr()->getSampleBlock();
MutableColumns columns = sample_block.cloneEmptyColumns();
@ -1070,17 +1235,27 @@ Chunk StorageKeeperMap::getBySerializedKeys(const std::span<const std::string> k
null_map->resize_fill(keys.size(), 1);
}
auto client = getClient();
Strings full_key_paths;
full_key_paths.reserve(keys.size());
for (const auto & key : keys)
{
full_key_paths.emplace_back(fullPathForKey(key));
}
auto values = client->tryGet(full_key_paths);
const auto & settings = local_context->getSettingsRef();
ZooKeeperRetriesControl zk_retry{
getName(),
getLogger(getName()),
ZooKeeperRetriesInfo{
settings.keeper_max_retries,
settings.keeper_retry_initial_backoff_ms,
settings.keeper_retry_max_backoff_ms},
local_context->getProcessListElement()};
zkutil::ZooKeeper::MultiTryGetResponse values;
zk_retry.retryLoop([&]{
auto client = getClient();
values = client->tryGet(full_key_paths);
});
for (size_t i = 0; i < keys.size(); ++i)
{
@ -1153,14 +1328,14 @@ void StorageKeeperMap::checkMutationIsPossible(const MutationCommands & commands
void StorageKeeperMap::mutate(const MutationCommands & commands, ContextPtr local_context)
{
checkTable<true>();
checkTable<true>(local_context);
if (commands.empty())
return;
bool strict = local_context->getSettingsRef().keeper_map_strict_mode;
assert(commands.size() == 1);
chassert(commands.size() == 1);
auto metadata_snapshot = getInMemoryMetadataPtr();
auto storage = getStorageID();
@ -1168,16 +1343,16 @@ void StorageKeeperMap::mutate(const MutationCommands & commands, ContextPtr loca
if (commands.front().type == MutationCommand::Type::DELETE)
{
MutationsInterpreter::Settings settings(true);
settings.return_all_columns = true;
settings.return_mutated_rows = true;
MutationsInterpreter::Settings mutation_settings(true);
mutation_settings.return_all_columns = true;
mutation_settings.return_mutated_rows = true;
auto interpreter = std::make_unique<MutationsInterpreter>(
storage_ptr,
metadata_snapshot,
commands,
local_context,
settings);
mutation_settings);
auto pipeline = QueryPipelineBuilder::getPipeline(interpreter->execute());
PullingPipelineExecutor executor(pipeline);
@ -1186,8 +1361,6 @@ void StorageKeeperMap::mutate(const MutationCommands & commands, ContextPtr loca
auto primary_key_pos = header.getPositionByName(primary_key);
auto version_position = header.getPositionByName(std::string{version_column_name});
auto client = getClient();
Block block;
while (executor.pull(block))
{
@ -1215,7 +1388,23 @@ void StorageKeeperMap::mutate(const MutationCommands & commands, ContextPtr loca
}
Coordination::Responses responses;
auto status = client->tryMulti(delete_requests, responses, /* check_session_valid */ true);
const auto & settings = local_context->getSettingsRef();
ZooKeeperRetriesControl zk_retry{
getName(),
getLogger(getName()),
ZooKeeperRetriesInfo{
settings.keeper_max_retries,
settings.keeper_retry_initial_backoff_ms,
settings.keeper_retry_max_backoff_ms},
local_context->getProcessListElement()};
Coordination::Error status;
zk_retry.retryLoop([&]
{
auto client = getClient();
status = client->tryMulti(delete_requests, responses, /* check_session_valid */ true);
});
if (status == Coordination::Error::ZOK)
return;
@ -1227,16 +1416,21 @@ void StorageKeeperMap::mutate(const MutationCommands & commands, ContextPtr loca
for (const auto & delete_request : delete_requests)
{
auto code = client->tryRemove(delete_request->getPath());
if (code != Coordination::Error::ZOK && code != Coordination::Error::ZNONODE)
throw zkutil::KeeperException::fromPath(code, delete_request->getPath());
zk_retry.retryLoop([&]
{
auto client = getClient();
status = client->tryRemove(delete_request->getPath());
});
if (status != Coordination::Error::ZOK && status != Coordination::Error::ZNONODE)
throw zkutil::KeeperException::fromPath(status, delete_request->getPath());
}
}
return;
}
assert(commands.front().type == MutationCommand::Type::UPDATE);
chassert(commands.front().type == MutationCommand::Type::UPDATE);
if (commands.front().column_to_update_expression.contains(primary_key))
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Primary key cannot be updated (cannot update column {})", primary_key);

View File

@ -54,7 +54,8 @@ public:
Names getPrimaryKey() const override { return {primary_key}; }
Chunk getByKeys(const ColumnsWithTypeAndName & keys, PaddedPODArray<UInt8> & null_map, const Names &) const override;
Chunk getBySerializedKeys(std::span<const std::string> keys, PaddedPODArray<UInt8> * null_map, bool with_version) const;
Chunk getBySerializedKeys(
std::span<const std::string> keys, PaddedPODArray<UInt8> * null_map, bool with_version, const ContextPtr & local_context) const;
Block getSampleBlock(const Names &) const override;
@ -77,10 +78,10 @@ public:
UInt64 keysLimit() const;
template <bool throw_on_error>
void checkTable() const
void checkTable(const ContextPtr & local_context) const
{
auto is_table_valid = isTableValid();
if (!is_table_valid.has_value())
auto current_table_status = getTableStatus(local_context);
if (table_status == TableStatus::UNKNOWN)
{
static constexpr auto error_msg = "Failed to activate table because of connection issues. It will be activated "
"once a connection is established and metadata is verified";
@ -93,10 +94,10 @@ public:
}
}
if (!*is_table_valid)
if (current_table_status != TableStatus::VALID)
{
static constexpr auto error_msg
= "Failed to activate table because of invalid metadata in ZooKeeper. Please DETACH table";
= "Failed to activate table because of invalid metadata in ZooKeeper. Please DROP/DETACH table";
if constexpr (throw_on_error)
throw Exception(ErrorCodes::INVALID_STATE, error_msg);
else
@ -110,7 +111,15 @@ public:
private:
bool dropTable(zkutil::ZooKeeperPtr zookeeper, const zkutil::EphemeralNodeHolder::Ptr & metadata_drop_lock);
std::optional<bool> isTableValid() const;
enum class TableStatus : uint8_t
{
UNKNOWN,
INVALID_METADATA,
INVALID_KEEPER_STRUCTURE,
VALID
};
TableStatus getTableStatus(const ContextPtr & context) const;
void restoreDataImpl(
const BackupPtr & backup,
@ -142,7 +151,8 @@ private:
mutable zkutil::ZooKeeperPtr zookeeper_client{nullptr};
mutable std::mutex init_mutex;
mutable std::optional<bool> table_is_valid;
mutable TableStatus table_status{TableStatus::UNKNOWN};
LoggerPtr log;
};

View File

@ -0,0 +1,3 @@
<clickhouse>
<database_catalog_drop_table_concurrency>256</database_catalog_drop_table_concurrency>
</clickhouse>

View File

@ -21,6 +21,7 @@ ln -sf $SRC_PATH/config.d/listen.xml $DEST_SERVER_PATH/config.d/
ln -sf $SRC_PATH/config.d/text_log.xml $DEST_SERVER_PATH/config.d/
ln -sf $SRC_PATH/config.d/blob_storage_log.xml $DEST_SERVER_PATH/config.d/
ln -sf $SRC_PATH/config.d/custom_settings_prefixes.xml $DEST_SERVER_PATH/config.d/
ln -sf $SRC_PATH/config.d/database_catalog_drop_table_concurrency.xml $DEST_SERVER_PATH/config.d/
ln -sf $SRC_PATH/config.d/enable_access_control_improvements.xml $DEST_SERVER_PATH/config.d/
ln -sf $SRC_PATH/config.d/macros.xml $DEST_SERVER_PATH/config.d/
ln -sf $SRC_PATH/config.d/secure_ports.xml $DEST_SERVER_PATH/config.d/

View File

@ -142,7 +142,7 @@ of parallel workers for `pytest-xdist`.
$ export CLICKHOUSE_TESTS_BASE_CONFIG_DIR=$HOME/ClickHouse/programs/server/
$ export CLICKHOUSE_TESTS_SERVER_BIN_PATH=$HOME/ClickHouse/programs/clickhouse
$ export CLICKHOUSE_TESTS_ODBC_BRIDGE_BIN_PATH=$HOME/ClickHouse/programs/clickhouse-odbc-bridge
$ ./runner 'test_storage_s3_queue/test.py::test_max_set_age -- --count 10 -n 5'
$ ./runner test_storage_s3_queue/test.py::test_max_set_age --count 10 -n 5
Start tests
=============================================================================== test session starts ================================================================================
platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.5.0 -- /usr/bin/python3

View File

@ -2,7 +2,7 @@ version: '2.3'
services:
minio1:
image: minio/minio:RELEASE.2023-09-30T07-02-29Z
image: minio/minio:RELEASE.2024-07-31T05-46-26Z
volumes:
- data1-1:/data1
- ${MINIO_CERTS_DIR:-}:/certs

View File

@ -3922,7 +3922,11 @@ class ClickHouseInstance:
)
def contains_in_log(
self, substring, from_host=False, filename="clickhouse-server.log"
self,
substring,
from_host=False,
filename="clickhouse-server.log",
exclusion_substring="",
):
if from_host:
# We check fist file exists but want to look for all rotated logs as well
@ -3930,7 +3934,7 @@ class ClickHouseInstance:
[
"bash",
"-c",
f'[ -f {self.logs_dir}/{filename} ] && zgrep -aH "{substring}" {self.logs_dir}/{filename}* || true',
f'[ -f {self.logs_dir}/{filename} ] && zgrep -aH "{substring}" {self.logs_dir}/{filename}* | ( [ -z "{exclusion_substring}" ] && cat || grep -v "${exclusion_substring}" ) || true',
]
)
else:
@ -3938,7 +3942,7 @@ class ClickHouseInstance:
[
"bash",
"-c",
f'[ -f /var/log/clickhouse-server/{filename} ] && zgrep -aH "{substring}" /var/log/clickhouse-server/{filename} || true',
f'[ -f /var/log/clickhouse-server/{filename} ] && zgrep -aH "{substring}" /var/log/clickhouse-server/{filename} | ( [ -z "{exclusion_substring}" ] && cat || grep -v "${exclusion_substring}" ) || true',
]
)
return len(result) > 0

View File

@ -1054,9 +1054,12 @@ def test_mutation():
backup_name = new_backup_name()
node1.query(f"BACKUP TABLE tbl ON CLUSTER 'cluster' TO {backup_name}")
assert not has_mutation_in_backup("0000000000", backup_name, "default", "tbl")
# mutation #0000000000: "UPDATE x=x+1 WHERE 1" could already finish before starting the backup
# mutation #0000000001: "UPDATE x=x+1+sleep(3) WHERE 1"
assert has_mutation_in_backup("0000000001", backup_name, "default", "tbl")
# mutation #0000000002: "UPDATE x=x+1+sleep(3) WHERE 1"
assert has_mutation_in_backup("0000000002", backup_name, "default", "tbl")
# mutation #0000000003: not expected
assert not has_mutation_in_backup("0000000003", backup_name, "default", "tbl")
node1.query("DROP TABLE tbl ON CLUSTER 'cluster' SYNC")

View File

@ -0,0 +1,16 @@
<clickhouse>
<remote_servers>
<default>
<shard>
<replica>
<host>writing_node</host>
<port>9000</port>
</replica>
<replica>
<host>reading_node</host>
<port>9000</port>
</replica>
</shard>
</default>
</remote_servers>
</clickhouse>

View File

@ -0,0 +1,3 @@
<clickhouse>
<disable_insertion_and_mutation>true</disable_insertion_and_mutation>
</clickhouse>

View File

@ -0,0 +1,3 @@
<clickhouse>
<disable_insertion_and_mutation>false</disable_insertion_and_mutation>
</clickhouse>

View File

@ -0,0 +1,75 @@
import pytest
from helpers.client import QueryRuntimeException
from helpers.cluster import ClickHouseCluster
import time
cluster = ClickHouseCluster(__file__)
writing_node = cluster.add_instance(
"writing_node",
main_configs=["config/writing_node.xml", "config/cluster.xml"],
with_zookeeper=True,
with_minio=True,
stay_alive=True,
macros={"shard": 1, "replica": 1},
)
reading_node = cluster.add_instance(
"reading_node",
main_configs=["config/reading_node.xml", "config/cluster.xml"],
with_zookeeper=True,
with_minio=True,
stay_alive=True,
macros={"shard": 1, "replica": 2},
)
@pytest.fixture(scope="module")
def started_cluster():
try:
cluster.start()
yield cluster
finally:
cluster.shutdown()
def test_disable_insertion_and_mutation(started_cluster):
writing_node.query(
"""CREATE TABLE my_table on cluster default (key UInt64, value String) ENGINE=ReplicatedMergeTree('/clickhouse/tables/{shard}/default.my_table', '{replica}') ORDER BY key partition by (key % 5) """
)
assert "QUERY_IS_PROHIBITED" in reading_node.query_and_get_error(
"INSERT INTO my_table VALUES (1, 'hello')"
)
assert "QUERY_IS_PROHIBITED" in reading_node.query_and_get_error(
"INSERT INTO my_table SETTINGS async_insert = 1 VALUES (1, 'hello')"
)
assert "QUERY_IS_PROHIBITED" in reading_node.query_and_get_error(
"ALTER TABLE my_table delete where 1"
)
assert "QUERY_IS_PROHIBITED" in reading_node.query_and_get_error(
"ALTER table my_table update key = 1 where 1"
)
assert "QUERY_IS_PROHIBITED" in reading_node.query_and_get_error(
"ALTER TABLE my_table drop partition 0"
)
reading_node.query("SELECT * from my_table")
writing_node.query("INSERT INTO my_table VALUES (1, 'hello')")
writing_node.query("ALTER TABLE my_table delete where 1")
writing_node.query("ALTER table my_table update value = 'no hello' where 1")
reading_node.query("ALTER TABLE my_table ADD COLUMN new_column UInt64")
writing_node.query("SELECT new_column from my_table")
reading_node.query("SELECT new_column from my_table")
reading_node.query("ALter Table my_table MODIFY COLUMN new_column String")
assert "new_column\tString" in reading_node.query("DESC my_table")
assert "new_column\tString" in writing_node.query("DESC my_table")

View File

@ -0,0 +1,14 @@
<clickhouse>
<profiles>
<default>
<insert_keeper_max_retries>0</insert_keeper_max_retries>
<keeper_max_retries>0</keeper_max_retries>
</default>
</profiles>
<users>
<default>
<password></password>
<profile>default</profile>
</default>
</users>
</clickhouse>

View File

@ -10,6 +10,7 @@ cluster = ClickHouseCluster(__file__)
node = cluster.add_instance(
"node",
main_configs=["configs/enable_keeper_map.xml"],
user_configs=["configs/keeper_retries.xml"],
with_zookeeper=True,
stay_alive=True,
)
@ -46,7 +47,10 @@ def assert_keeper_exception_after_partition(query):
with PartitionManager() as pm:
pm.drop_instance_zk_connections(node)
try:
error = node.query_and_get_error_with_retry(query, sleep_time=1)
error = node.query_and_get_error_with_retry(
query,
sleep_time=1,
)
assert "Coordination::Exception" in error
except:
print_iptables_rules()
@ -63,6 +67,7 @@ def run_query(query):
def test_keeper_map_without_zk(started_cluster):
run_query("DROP TABLE IF EXISTS test_keeper_map_without_zk SYNC")
assert_keeper_exception_after_partition(
"CREATE TABLE test_keeper_map_without_zk (key UInt64, value UInt64) ENGINE = KeeperMap('/test_keeper_map_without_zk') PRIMARY KEY(key);"
)
@ -84,7 +89,8 @@ def test_keeper_map_without_zk(started_cluster):
node.restart_clickhouse(60)
try:
error = node.query_and_get_error_with_retry(
"SELECT * FROM test_keeper_map_without_zk", sleep_time=1
"SELECT * FROM test_keeper_map_without_zk",
sleep_time=1,
)
assert "Failed to activate table because of connection issues" in error
except:
@ -101,12 +107,12 @@ def test_keeper_map_without_zk(started_cluster):
)
assert "Failed to activate table because of invalid metadata in ZooKeeper" in error
node.query("DETACH TABLE test_keeper_map_without_zk")
client.stop()
def test_keeper_map_with_failed_drop(started_cluster):
run_query("DROP TABLE IF EXISTS test_keeper_map_with_failed_drop SYNC")
run_query("DROP TABLE IF EXISTS test_keeper_map_with_failed_drop_another SYNC")
run_query(
"CREATE TABLE test_keeper_map_with_failed_drop (key UInt64, value UInt64) ENGINE = KeeperMap('/test_keeper_map_with_failed_drop') PRIMARY KEY(key);"
)

View File

@ -0,0 +1,3 @@
<clickhouse>
<keeper_map_path_prefix>/test_keeper_map</keeper_map_path_prefix>
</clickhouse>

View File

@ -0,0 +1,7 @@
<clickhouse>
<zookeeper>
<enable_fault_injections_during_startup>1</enable_fault_injections_during_startup>
<send_fault_probability>0.005</send_fault_probability>
<recv_fault_probability>0.005</recv_fault_probability>
</zookeeper>
</clickhouse>

View File

@ -0,0 +1,14 @@
<clickhouse>
<profiles>
<default>
<keeper_max_retries>20</keeper_max_retries>
<keeper_retry_max_backoff_ms>10000</keeper_retry_max_backoff_ms>
</default>
</profiles>
<users>
<default>
<password></password>
<profile>default</profile>
</default>
</users>
</clickhouse>

View File

@ -0,0 +1,75 @@
import pytest
from helpers.cluster import ClickHouseCluster
import os
CONFIG_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "configs")
cluster = ClickHouseCluster(__file__)
node = cluster.add_instance(
"node",
main_configs=["configs/enable_keeper_map.xml"],
user_configs=["configs/keeper_retries.xml"],
with_zookeeper=True,
stay_alive=True,
)
def start_clean_clickhouse():
# remove fault injection if present
if "fault_injection.xml" in node.exec_in_container(
["bash", "-c", "ls /etc/clickhouse-server/config.d"]
):
print("Removing fault injection")
node.exec_in_container(
["bash", "-c", "rm /etc/clickhouse-server/config.d/fault_injection.xml"]
)
node.restart_clickhouse()
@pytest.fixture(scope="module")
def started_cluster():
try:
cluster.start()
yield cluster
finally:
cluster.shutdown()
def repeat_query(query, repeat):
for _ in range(repeat):
node.query(
query,
)
def test_queries(started_cluster):
start_clean_clickhouse()
node.query("DROP TABLE IF EXISTS keeper_map_retries SYNC")
node.stop_clickhouse()
node.copy_file_to_container(
os.path.join(CONFIG_DIR, "fault_injection.xml"),
"/etc/clickhouse-server/config.d/fault_injection.xml",
)
node.start_clickhouse()
repeat_count = 10
node.query(
"CREATE TABLE keeper_map_retries (a UInt64, b UInt64) Engine=KeeperMap('/keeper_map_retries') PRIMARY KEY a",
)
repeat_query(
"INSERT INTO keeper_map_retries SELECT number, number FROM numbers(500)",
repeat_count,
)
repeat_query("SELECT * FROM keeper_map_retries", repeat_count)
repeat_query(
"ALTER TABLE keeper_map_retries UPDATE b = 3 WHERE a > 2", repeat_count
)
repeat_query("ALTER TABLE keeper_map_retries DELETE WHERE a > 2", repeat_count)
repeat_query("TRUNCATE keeper_map_retries", repeat_count)

View File

@ -13,6 +13,7 @@ node = cluster.add_instance(
with_zookeeper=True,
with_azurite=True,
)
base_search_query = "SELECT COUNT() FROM system.query_log WHERE query LIKE "
@pytest.fixture(scope="module", autouse=True)
@ -35,7 +36,7 @@ def check_logs(must_contain=[], must_not_contain=[]):
.replace("]", "\\]")
.replace("*", "\\*")
)
assert node.contains_in_log(escaped_str)
assert node.contains_in_log(escaped_str, exclusion_substring=base_search_query)
for str in must_not_contain:
escaped_str = (
@ -44,7 +45,9 @@ def check_logs(must_contain=[], must_not_contain=[]):
.replace("]", "\\]")
.replace("*", "\\*")
)
assert not node.contains_in_log(escaped_str)
assert not node.contains_in_log(
escaped_str, exclusion_substring=base_search_query
)
for str in must_contain:
escaped_str = str.replace("'", "\\'")
@ -60,7 +63,7 @@ def system_query_log_contains_search_pattern(search_pattern):
return (
int(
node.query(
f"SELECT COUNT() FROM system.query_log WHERE query LIKE '%{search_pattern}%'"
f"{base_search_query}'%{search_pattern}%' AND query NOT LIKE '{base_search_query}%'"
).strip()
)
>= 1
@ -105,7 +108,6 @@ def test_create_alter_user():
must_not_contain=[
password,
"IDENTIFIED BY",
"IDENTIFIED BY",
"IDENTIFIED WITH plaintext_password BY",
],
)
@ -366,10 +368,7 @@ def test_table_functions():
f"remoteSecure(named_collection_6, addresses_expr = '127.{{2..11}}', database = 'default', table = 'remote_table', user = 'remote_user', password = '{password}')",
f"s3('http://minio1:9001/root/data/test9.csv.gz', 'NOSIGN', 'CSV')",
f"s3('http://minio1:9001/root/data/test10.csv.gz', 'minio', '{password}')",
(
f"deltaLake('http://minio1:9001/root/data/test11.csv.gz', 'minio', '{password}')",
"DNS_ERROR",
),
f"azureBlobStorage('{azure_conn_string}', 'cont', 'test_simple.csv', 'CSV')",
f"azureBlobStorage('{azure_conn_string}', 'cont', 'test_simple_1.csv', 'CSV', 'none')",
f"azureBlobStorage('{azure_conn_string}', 'cont', 'test_simple_2.csv', 'CSV', 'none', 'auto')",

View File

@ -71,7 +71,7 @@ def test_first_or_random(started_cluster):
[
"bash",
"-c",
"lsof -a -i4 -i6 -itcp -w | grep 'testzookeeperconfigloadbalancing_zoo1_1.*testzookeeperconfigloadbalancing_default:2181' | grep ESTABLISHED | wc -l",
"lsof -a -i4 -i6 -itcp -w | grep -P 'testzookeeperconfigloadbalancing_(gw\\d+_)?zoo1_1.*testzookeeperconfigloadbalancing_(gw\\d+_)?default:2181' | grep ESTABLISHED | wc -l",
],
privileged=True,
user="root",
@ -99,7 +99,7 @@ def test_first_or_random(started_cluster):
[
"bash",
"-c",
"lsof -a -i4 -i6 -itcp -w | grep 'testzookeeperconfigloadbalancing_zoo1_1.*testzookeeperconfigloadbalancing_default:2181' | grep ESTABLISHED | wc -l",
"lsof -a -i4 -i6 -itcp -w | grep -P 'testzookeeperconfigloadbalancing_(gw\\d+_)?zoo1_1.*testzookeeperconfigloadbalancing_(gw\\d+_)?default:2181' | grep ESTABLISHED | wc -l",
],
privileged=True,
user="root",
@ -127,7 +127,7 @@ def test_first_or_random(started_cluster):
[
"bash",
"-c",
"lsof -a -i4 -i6 -itcp -w | grep 'testzookeeperconfigloadbalancing_zoo1_1.*testzookeeperconfigloadbalancing_default:2181' | grep ESTABLISHED | wc -l",
"lsof -a -i4 -i6 -itcp -w | grep -P 'testzookeeperconfigloadbalancing_(gw\\d+_)?zoo1_1.*testzookeeperconfigloadbalancing_(gw\\d+_)?default:2181' | grep ESTABLISHED | wc -l",
],
privileged=True,
user="root",
@ -161,7 +161,7 @@ def test_in_order(started_cluster):
[
"bash",
"-c",
"lsof -a -i4 -i6 -itcp -w | grep 'testzookeeperconfigloadbalancing_zoo1_1.*testzookeeperconfigloadbalancing_default:2181' | grep ESTABLISHED | wc -l",
"lsof -a -i4 -i6 -itcp -w | grep -P 'testzookeeperconfigloadbalancing_(gw\\d+_)?zoo1_1.*testzookeeperconfigloadbalancing_(gw\\d+_)?default:2181' | grep ESTABLISHED | wc -l",
],
privileged=True,
user="root",
@ -189,7 +189,7 @@ def test_in_order(started_cluster):
[
"bash",
"-c",
"lsof -a -i4 -i6 -itcp -w | grep 'testzookeeperconfigloadbalancing_zoo1_1.*testzookeeperconfigloadbalancing_default:2181' | grep ESTABLISHED | wc -l",
"lsof -a -i4 -i6 -itcp -w | grep -P 'testzookeeperconfigloadbalancing_(gw\\d+_)?zoo1_1.*testzookeeperconfigloadbalancing_(gw\\d+_)?default:2181' | grep ESTABLISHED | wc -l",
],
privileged=True,
user="root",
@ -217,7 +217,7 @@ def test_in_order(started_cluster):
[
"bash",
"-c",
"lsof -a -i4 -i6 -itcp -w | grep 'testzookeeperconfigloadbalancing_zoo1_1.*testzookeeperconfigloadbalancing_default:2181' | grep ESTABLISHED | wc -l",
"lsof -a -i4 -i6 -itcp -w | grep -P 'testzookeeperconfigloadbalancing_(gw\\d+_)?zoo1_1.*testzookeeperconfigloadbalancing_(gw\\d+_)?default:2181' | grep ESTABLISHED | wc -l",
],
privileged=True,
user="root",
@ -251,7 +251,7 @@ def test_nearest_hostname(started_cluster):
[
"bash",
"-c",
"lsof -a -i4 -i6 -itcp -w | grep 'testzookeeperconfigloadbalancing_zoo1_1.*testzookeeperconfigloadbalancing_default:2181' | grep ESTABLISHED | wc -l",
"lsof -a -i4 -i6 -itcp -w | grep -P 'testzookeeperconfigloadbalancing_(gw\\d+_)?zoo1_1.*testzookeeperconfigloadbalancing_(gw\\d+_)?default:2181' | grep ESTABLISHED | wc -l",
],
privileged=True,
user="root",
@ -279,7 +279,7 @@ def test_nearest_hostname(started_cluster):
[
"bash",
"-c",
"lsof -a -i4 -i6 -itcp -w | grep 'testzookeeperconfigloadbalancing_zoo2_1.*testzookeeperconfigloadbalancing_default:2181' | grep ESTABLISHED | wc -l",
"lsof -a -i4 -i6 -itcp -w | grep -P 'testzookeeperconfigloadbalancing_(gw\\d+_)?zoo2_1.*testzookeeperconfigloadbalancing_(gw\\d+_)?default:2181' | grep ESTABLISHED | wc -l",
],
privileged=True,
user="root",
@ -307,7 +307,7 @@ def test_nearest_hostname(started_cluster):
[
"bash",
"-c",
"lsof -a -i4 -i6 -itcp -w | grep 'testzookeeperconfigloadbalancing_zoo3_1.*testzookeeperconfigloadbalancing_default:2181' | grep ESTABLISHED | wc -l",
"lsof -a -i4 -i6 -itcp -w | grep -P 'testzookeeperconfigloadbalancing_(gw\\d+_)?zoo3_1.*testzookeeperconfigloadbalancing_(gw\\d+_)?default:2181' | grep ESTABLISHED | wc -l",
],
privileged=True,
user="root",
@ -341,7 +341,7 @@ def test_hostname_levenshtein_distance(started_cluster):
[
"bash",
"-c",
"lsof -a -i4 -i6 -itcp -w | grep 'testzookeeperconfigloadbalancing_zoo1_1.*testzookeeperconfigloadbalancing_default:2181' | grep ESTABLISHED | wc -l",
"lsof -a -i4 -i6 -itcp -w | grep -P 'testzookeeperconfigloadbalancing_(gw\\d+_)?zoo1_1.*testzookeeperconfigloadbalancing_(gw\\d+_)?default:2181' | grep ESTABLISHED | wc -l",
],
privileged=True,
user="root",
@ -369,7 +369,7 @@ def test_hostname_levenshtein_distance(started_cluster):
[
"bash",
"-c",
"lsof -a -i4 -i6 -itcp -w | grep 'testzookeeperconfigloadbalancing_zoo2_1.*testzookeeperconfigloadbalancing_default:2181' | grep ESTABLISHED | wc -l",
"lsof -a -i4 -i6 -itcp -w | grep -P 'testzookeeperconfigloadbalancing_(gw\\d+_)?zoo2_1.*testzookeeperconfigloadbalancing_(gw\\d+_)?default:2181' | grep ESTABLISHED | wc -l",
],
privileged=True,
user="root",
@ -397,7 +397,7 @@ def test_hostname_levenshtein_distance(started_cluster):
[
"bash",
"-c",
"lsof -a -i4 -i6 -itcp -w | grep 'testzookeeperconfigloadbalancing_zoo3_1.*testzookeeperconfigloadbalancing_default:2181' | grep ESTABLISHED | wc -l",
"lsof -a -i4 -i6 -itcp -w | grep -P 'testzookeeperconfigloadbalancing_(gw\\d+_)?zoo3_1.*testzookeeperconfigloadbalancing_(gw\\d+_)?default:2181' | grep ESTABLISHED | wc -l",
],
privileged=True,
user="root",

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash
# Tags: no-fasttest
# Tags: no-fasttest, no-parallel
# Tag no-fasttest: needs pv
# Tag no-parallel: reads from a system table
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
@ -12,9 +13,23 @@ ${CLICKHOUSE_CLIENT} --query "DROP TABLE IF EXISTS t; CREATE TABLE t (x UInt64)
seq 1 1000 | pv --quiet --rate-limit 400 | ${CLICKHOUSE_CLIENT} --query "INSERT INTO t FORMAT TSV"
# We check that the value of NetworkReceiveElapsedMicroseconds correctly includes the time spent waiting data from the client.
${CLICKHOUSE_CLIENT} --query "SYSTEM FLUSH LOGS;
WITH ProfileEvents['NetworkReceiveElapsedMicroseconds'] AS time
SELECT time >= 1000000 ? 1 : time FROM system.query_log
WHERE current_database = currentDatabase() AND query_kind = 'Insert' AND event_date >= yesterday() AND type = 2 ORDER BY event_time DESC LIMIT 1;"
result=$(${CLICKHOUSE_CLIENT} --query "SYSTEM FLUSH LOGS;
WITH ProfileEvents['NetworkReceiveElapsedMicroseconds'] AS elapsed_us
SELECT elapsed_us FROM system.query_log
WHERE current_database = currentDatabase() AND query_kind = 'Insert' AND event_date >= yesterday() AND type = 'QueryFinish'
ORDER BY event_time DESC LIMIT 1;")
elapsed_us=$(echo $result | sed 's/ .*//')
min_elapsed_us=1000000
if [[ "$elapsed_us" -ge "$min_elapsed_us" ]]; then
echo 1
else
# Print debug info
${CLICKHOUSE_CLIENT} --query "
WITH ProfileEvents['NetworkReceiveElapsedMicroseconds'] AS elapsed_us
SELECT query_start_time_microseconds, event_time_microseconds, query_duration_ms, elapsed_us, query FROM system.query_log
WHERE current_database = currentDatabase() and event_date >= yesterday() AND type = 'QueryFinish' ORDER BY query_start_time;"
fi
${CLICKHOUSE_CLIENT} --query "DROP TABLE t"

View File

@ -11,7 +11,12 @@ CREATE VIEW number_view as SELECT * FROM numbers(10) as tb;
CREATE MATERIALIZED VIEW null_mv Engine = Log AS SELECT * FROM null_table LEFT JOIN number_view as tb USING number;
CREATE TABLE null_table_buffer (number UInt64) ENGINE = Buffer(currentDatabase(), null_table, 1, 1, 1, 100, 200, 10000, 20000);
INSERT INTO null_table_buffer VALUES (1);
SELECT sleep(3) FORMAT Null;
-- OPTIMIZE query should flush Buffer table, but still it is not guaranteed
-- (see the comment StorageBuffer::optimize)
-- But the combination of OPTIMIZE + sleep + OPTIMIZE should be enough.
OPTIMIZE TABLE null_table_buffer;
SELECT sleep(1) FORMAT Null;
OPTIMIZE TABLE null_table_buffer;
-- Insert about should've landed into `null_mv`
SELECT count() FROM null_mv;
1

View File

@ -13,7 +13,13 @@ CREATE MATERIALIZED VIEW null_mv Engine = Log AS SELECT * FROM null_table LEFT J
CREATE TABLE null_table_buffer (number UInt64) ENGINE = Buffer(currentDatabase(), null_table, 1, 1, 1, 100, 200, 10000, 20000);
INSERT INTO null_table_buffer VALUES (1);
SELECT sleep(3) FORMAT Null;
-- OPTIMIZE query should flush Buffer table, but still it is not guaranteed
-- (see the comment StorageBuffer::optimize)
-- But the combination of OPTIMIZE + sleep + OPTIMIZE should be enough.
OPTIMIZE TABLE null_table_buffer;
SELECT sleep(1) FORMAT Null;
OPTIMIZE TABLE null_table_buffer;
-- Insert about should've landed into `null_mv`
SELECT count() FROM null_mv;

View File

@ -5,29 +5,8 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
# Copies a test predefined backup from "/tests/queries/0_stateless/backups/" folder to the "backups" disk,
# returns the path to the backup relative to that disk.
function install_test_backup()
{
local test_backup_filename="$1"
local test_backup_path="$CURDIR/backups/${test_backup_filename}"
local backups_disk_root
backups_disk_root=$($CLICKHOUSE_CLIENT --query "SELECT path FROM system.disks WHERE name='backups'")
if [ -z "${backups_disk_root}" ]; then
echo "Disk '${backups_disk_root}' not found"
exit 1
fi
local install_path=${backups_disk_root}/${CLICKHOUSE_DATABASE}/${test_backup_filename}
mkdir -p "$(dirname "${install_path}")"
ln -s "${test_backup_path}" "${install_path}"
echo "${CLICKHOUSE_DATABASE}/${test_backup_filename}"
}
backup_name="$(install_test_backup with_broken_part.zip)"
# In this test we restore from "/tests/queries/0_stateless/backups/with_broken_part.zip"
backup_name="$($CURDIR/helpers/install_predefined_backup.sh with_broken_part.zip)"
$CLICKHOUSE_CLIENT --query "DROP TABLE IF EXISTS tbl"

View File

@ -13,20 +13,9 @@ $CLICKHOUSE_CLIENT -nm -q "
CREATE TABLE $database_name.02911_backup_restore_keeper_map3 (key UInt64, value String) Engine=KeeperMap('/' || currentDatabase() || '/test02911_different') PRIMARY KEY key;
"
# KeeperMap table engine doesn't have internal retries for interaction with Keeper. Do it on our own, otherwise tests with overloaded server can be flaky.
while true
do
$CLICKHOUSE_CLIENT -nm -q "INSERT INTO $database_name.02911_backup_restore_keeper_map2 SELECT number, 'test' || toString(number) FROM system.numbers LIMIT 5000;
" 2>&1 | grep -q "KEEPER_EXCEPTION" && sleep 1 && continue
break
done
$CLICKHOUSE_CLIENT -nm -q "INSERT INTO $database_name.02911_backup_restore_keeper_map2 SELECT number, 'test' || toString(number) FROM system.numbers LIMIT 5000;"
while true
do
$CLICKHOUSE_CLIENT -nm -q "INSERT INTO $database_name.02911_backup_restore_keeper_map3 SELECT number, 'test' || toString(number) FROM system.numbers LIMIT 3000;
" 2>&1 | grep -q "KEEPER_EXCEPTION" && sleep 1 && continue
break
done
$CLICKHOUSE_CLIENT -nm -q "INSERT INTO $database_name.02911_backup_restore_keeper_map3 SELECT number, 'test' || toString(number) FROM system.numbers LIMIT 3000;"
backup_path="$database_name"
for i in $(seq 1 3); do

View File

@ -11,23 +11,28 @@ allow_create_index_without_type 0
allow_custom_error_code_in_throwif 0
allow_ddl 1
allow_deprecated_database_ordinary 0
allow_deprecated_error_prone_window_functions 0
allow_deprecated_snowflake_conversion_functions 0
allow_deprecated_syntax_for_merge_tree 0
allow_distributed_ddl 1
allow_drop_detached 0
allow_execute_multiif_columnar 1
allow_experimental_alter_materialized_view_structure 1
allow_experimental_analyzer 0
allow_experimental_analyzer 1
allow_experimental_annoy_index 0
allow_experimental_bigint_types 1
allow_experimental_codecs 0
allow_experimental_database_atomic 1
allow_experimental_database_materialized_mysql 0
allow_experimental_database_materialized_postgresql 0
allow_experimental_database_replicated 0
allow_experimental_database_replicated 1
allow_experimental_dynamic_type 0
allow_experimental_full_text_index 0
allow_experimental_funnel_functions 0
allow_experimental_geo_types 1
allow_experimental_hash_functions 0
allow_experimental_inverted_index 0
allow_experimental_join_condition 0
allow_experimental_lightweight_delete 1
allow_experimental_live_view 0
allow_experimental_map_type 1
@ -40,12 +45,15 @@ allow_experimental_query_cache 1
allow_experimental_query_deduplication 0
allow_experimental_refreshable_materialized_view 0
allow_experimental_s3queue 1
allow_experimental_shared_merge_tree 0
allow_experimental_shared_merge_tree 1
allow_experimental_statistic 0
allow_experimental_statistics 0
allow_experimental_undrop_table_query 1
allow_experimental_usearch_index 0
allow_experimental_variant_type 0
allow_experimental_window_functions 1
allow_experimental_window_view 0
allow_get_client_http_header 0
allow_hyperscan 1
allow_introspection_functions 0
allow_named_collection_override_by_default 1
@ -58,17 +66,21 @@ allow_prefetched_read_pool_for_remote_filesystem 1
allow_push_predicate_when_subquery_contains_with 1
allow_settings_after_format_in_insert 0
allow_simdjson 1
allow_statistic_optimize 0
allow_statistics_optimize 0
allow_suspicious_codecs 0
allow_suspicious_fixed_string_types 0
allow_suspicious_indices 0
allow_suspicious_low_cardinality_types 0
allow_suspicious_primary_key 0
allow_suspicious_ttl_expressions 0
allow_suspicious_variant_types 0
allow_unrestricted_reads_from_keeper 0
alter_move_to_space_execute_async 0
alter_partition_verbose_result 0
alter_sync 1
analyze_index_with_space_filling_curves 1
analyzer_compatibility_join_using_top_level_identifier 0
annoy_index_search_k_nodes -1
any_join_distinct_right_table_keys 0
apply_deleted_mask 1
@ -76,20 +88,42 @@ apply_mutations_on_fly 0
asterisk_include_alias_columns 0
asterisk_include_materialized_columns 0
async_insert 0
async_insert_busy_timeout_decrease_rate 0.2
async_insert_busy_timeout_increase_rate 0.2
async_insert_busy_timeout_max_ms 200
async_insert_busy_timeout_min_ms 50
async_insert_busy_timeout_ms 200
async_insert_cleanup_timeout_ms 1000
async_insert_deduplicate 0
async_insert_max_data_size 1000000
async_insert_max_data_size 10485760
async_insert_max_query_number 450
async_insert_poll_timeout_ms 10
async_insert_stale_timeout_ms 0
async_insert_threads 16
async_insert_use_adaptive_busy_timeout 1
async_query_sending_for_remote 1
async_socket_for_remote 1
azure_allow_parallel_part_upload 1
azure_create_new_file_on_insert 0
azure_ignore_file_doesnt_exist 0
azure_list_object_keys_size 1000
azure_max_blocks_in_multipart_upload 50000
azure_max_inflight_parts_for_one_file 20
azure_max_single_part_copy_size 268435456
azure_max_single_part_upload_size 104857600
azure_max_single_read_retries 4
azure_max_unexpected_write_error_retries 4
azure_max_upload_part_size 5368709120
azure_min_upload_part_size 16777216
azure_sdk_max_retries 10
azure_sdk_retry_initial_backoff_ms 10
azure_sdk_retry_max_backoff_ms 1000
azure_skip_empty_files 0
azure_strict_upload_part_size 0
azure_throw_on_zero_files_match 0
azure_truncate_on_insert 0
azure_upload_part_size_multiply_factor 2
azure_upload_part_size_multiply_parts_count_threshold 500
background_buffer_flush_schedule_pool_size 16
background_common_pool_size 8
background_distributed_schedule_pool_size 16
@ -107,6 +141,7 @@ backup_restore_keeper_max_retries 20
backup_restore_keeper_retry_initial_backoff_ms 100
backup_restore_keeper_retry_max_backoff_ms 5000
backup_restore_keeper_value_max_size 1048576
backup_restore_s3_retry_attempts 1000
backup_threads 16
bool_false_representation false
bool_true_representation true
@ -115,6 +150,7 @@ calculate_text_stack_trace 1
cancel_http_readonly_queries_on_client_close 0
cast_ipv4_ipv6_default_on_conversion_error 0
cast_keep_nullable 0
cast_string_to_dynamic_use_inference 0
check_query_single_value_result 1
check_referential_table_dependencies 0
check_table_dependencies 1
@ -123,6 +159,7 @@ cloud_mode 0
cloud_mode_engine 1
cluster_for_parallel_replicas
collect_hash_table_stats_during_aggregation 1
collect_hash_table_stats_during_joins 1
column_names_for_schema_inference
compatibility
compatibility_ignore_auto_increment_in_create_table 0
@ -141,9 +178,12 @@ count_distinct_optimization 0
create_index_ignore_unique 0
create_replicated_merge_tree_fault_injection_probability 0
create_table_empty_primary_key_by_default 0
cross_join_min_bytes_to_compress 1073741824
cross_join_min_rows_to_compress 10000000
cross_to_inner_join_rewrite 1
data_type_default_nullable 0
database_atomic_wait_for_drop_and_detach_synchronously 0
database_replicated_allow_heavy_create 0
database_replicated_allow_only_replicated_engine 0
database_replicated_allow_replicated_engine_arguments 1
database_replicated_always_detach_permanently 0
@ -156,15 +196,19 @@ date_time_overflow_behavior ignore
decimal_check_overflow 1
deduplicate_blocks_in_dependent_materialized_views 0
default_database_engine Atomic
default_materialized_view_sql_security DEFINER
default_max_bytes_in_join 1000000000
default_table_engine None
default_normal_view_sql_security INVOKER
default_table_engine MergeTree
default_temporary_table_engine Memory
default_view_definer CURRENT_USER
describe_compact_output 0
describe_extend_object_types 0
describe_include_subcolumns 0
describe_include_virtual_columns 0
dialect clickhouse
dictionary_use_async_executor 0
dictionary_validate_primary_key_type 0
distinct_overflow_mode throw
distributed_aggregation_memory_efficient 1
distributed_background_insert_batch 0
@ -182,6 +226,7 @@ distributed_directory_monitor_sleep_time_ms 100
distributed_directory_monitor_split_batch_on_failure 0
distributed_foreground_insert 0
distributed_group_by_no_merge 0
distributed_insert_skip_read_only_replicas 0
distributed_product_mode deny
distributed_push_down_limit 1
distributed_replica_error_cap 1000
@ -191,6 +236,7 @@ do_not_merge_across_partitions_select_final 0
drain_timeout 3
empty_result_for_aggregation_by_constant_keys_on_empty_set 1
empty_result_for_aggregation_by_empty_set 0
enable_blob_storage_log 1
enable_debug_queries 0
enable_deflate_qpl_codec 0
enable_early_constant_folding 1
@ -205,6 +251,7 @@ enable_job_stack_trace 0
enable_lightweight_delete 1
enable_memory_bound_merging_of_aggregation_results 1
enable_multiple_prewhere_read_steps 1
enable_named_columns_in_function_tuple 1
enable_optimize_predicate_expression 1
enable_optimize_predicate_expression_to_final_subquery 1
enable_order_by_all 1
@ -216,7 +263,9 @@ enable_sharing_sets_for_mutations 1
enable_software_prefetch_in_aggregation 1
enable_unaligned_array_join 0
enable_url_encoding 1
enable_vertical_final 1
enable_writes_to_query_cache 1
enable_zstd_qat_codec 0
engine_file_allow_create_multiple_files 0
engine_file_empty_if_not_exists 0
engine_file_skip_empty_files 0
@ -231,10 +280,12 @@ external_storage_max_read_rows 0
external_storage_rw_timeout_sec 300
external_table_functions_use_nulls 1
external_table_strict_query 0
extract_key_value_pairs_max_pairs_per_row 1000
extract_kvp_max_pairs_per_row 1000
extremes 0
fallback_to_stale_replicas_for_distributed_queries 1
filesystem_cache_max_download_size 137438953472
filesystem_cache_reserve_space_wait_lock_timeout_milliseconds 1000
filesystem_cache_segments_batch_size 20
filesystem_prefetch_max_memory_usage 1073741824
filesystem_prefetch_min_bytes_for_single_read_task 2097152
@ -278,7 +329,9 @@ format_regexp_escaping_rule Raw
format_regexp_skip_unmatched 0
format_schema
format_template_resultset
format_template_resultset_format
format_template_row
format_template_row_format
format_template_rows_between_delimiter \n
format_tsv_null_representation \\N
formatdatetime_f_prints_single_zero 0
@ -288,8 +341,11 @@ fsync_metadata 1
function_implementation
function_json_value_return_type_allow_complex 0
function_json_value_return_type_allow_nullable 0
function_locate_has_mysql_compatible_argument_order 1
function_range_max_elements_in_block 500000000
function_sleep_max_microseconds_per_block 3000000
function_visible_width_behavior 1
geo_distance_returns_float64_on_float64_arguments 1
glob_expansion_max_elements 1000
grace_hash_join_initial_buckets 1
grace_hash_join_max_buckets 1024
@ -300,8 +356,10 @@ group_by_use_nulls 0
handle_kafka_error_mode default
handshake_timeout_ms 10000
hdfs_create_new_file_on_insert 0
hdfs_ignore_file_doesnt_exist 0
hdfs_replication 0
hdfs_skip_empty_files 0
hdfs_throw_on_zero_files_match 0
hdfs_truncate_on_insert 0
hedged_connection_timeout_ms 50
hsts_max_age 0
@ -326,10 +384,14 @@ http_skip_not_found_url_for_globs 1
http_wait_end_of_query 0
http_write_exception_in_output_format 1
http_zlib_compression_level 3
iceberg_engine_ignore_schema_evolution 0
idle_connection_timeout 3600
ignore_cold_parts_seconds 0
ignore_data_skipping_indices
ignore_drop_queries_probability 0
ignore_materialized_views_with_dropped_target_table 0
ignore_on_cluster_for_replicated_access_entities_queries 0
ignore_on_cluster_for_replicated_named_collections_queries 0
ignore_on_cluster_for_replicated_udf_queries 0
implicit_transaction 0
input_format_allow_errors_num 0
@ -341,12 +403,14 @@ input_format_arrow_import_nested 0
input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference 0
input_format_avro_allow_missing_fields 0
input_format_avro_null_as_default 0
input_format_binary_decode_types_in_binary_format 0
input_format_bson_skip_fields_with_unsupported_types_in_schema_inference 0
input_format_capn_proto_skip_fields_with_unsupported_types_in_schema_inference 0
input_format_csv_allow_cr_end_of_line 0
input_format_csv_allow_variable_number_of_columns 0
input_format_csv_allow_whitespace_or_tab_as_delimiter 0
input_format_csv_arrays_as_nested_csv 0
input_format_csv_deserialize_separate_columns_into_tuple 1
input_format_csv_detect_header 1
input_format_csv_empty_as_default 1
input_format_csv_enum_as_number 0
@ -354,29 +418,37 @@ input_format_csv_skip_first_lines 0
input_format_csv_skip_trailing_empty_lines 0
input_format_csv_trim_whitespaces 1
input_format_csv_try_infer_numbers_from_strings 0
input_format_csv_try_infer_strings_from_quoted_tuples 1
input_format_csv_use_best_effort_in_schema_inference 1
input_format_csv_use_default_on_bad_values 0
input_format_custom_allow_variable_number_of_columns 0
input_format_custom_detect_header 1
input_format_custom_skip_trailing_empty_lines 0
input_format_defaults_for_omitted_fields 1
input_format_force_null_for_omitted_fields 0
input_format_hive_text_allow_variable_number_of_columns 1
input_format_hive_text_collection_items_delimiter 
input_format_hive_text_fields_delimiter 
input_format_hive_text_map_keys_delimiter 
input_format_import_nested_json 0
input_format_ipv4_default_on_conversion_error 0
input_format_ipv6_default_on_conversion_error 0
input_format_json_case_insensitive_column_matching 0
input_format_json_compact_allow_variable_number_of_columns 0
input_format_json_defaults_for_missing_elements_in_named_tuple 1
input_format_json_ignore_unknown_keys_in_named_tuple 1
input_format_json_ignore_unnecessary_fields 1
input_format_json_infer_incomplete_types_as_strings 1
input_format_json_named_tuples_as_objects 1
input_format_json_read_arrays_as_strings 1
input_format_json_read_bools_as_numbers 1
input_format_json_read_bools_as_strings 1
input_format_json_read_numbers_as_strings 1
input_format_json_read_objects_as_strings 1
input_format_json_throw_on_bad_escape_sequence 1
input_format_json_try_infer_named_tuples_from_objects 1
input_format_json_try_infer_numbers_from_strings 0
input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects 0
input_format_json_validate_types_from_metadata 1
input_format_max_bytes_to_read_for_schema_inference 33554432
input_format_max_rows_to_read_for_schema_inference 25000
@ -384,11 +456,13 @@ input_format_msgpack_number_of_columns 0
input_format_mysql_dump_map_column_names 1
input_format_mysql_dump_table_name
input_format_native_allow_types_conversion 1
input_format_native_decode_types_in_binary_format 0
input_format_null_as_default 1
input_format_orc_allow_missing_columns 1
input_format_orc_case_insensitive_column_matching 0
input_format_orc_filter_push_down 1
input_format_orc_import_nested 0
input_format_orc_reader_time_zone_name GMT
input_format_orc_row_batch_size 100000
input_format_orc_skip_columns_with_unsupported_types_in_schema_inference 0
input_format_orc_use_fast_decoder 1
@ -398,17 +472,21 @@ input_format_parquet_case_insensitive_column_matching 0
input_format_parquet_filter_push_down 1
input_format_parquet_import_nested 0
input_format_parquet_local_file_min_bytes_for_seek 8192
input_format_parquet_max_block_size 8192
input_format_parquet_max_block_size 65409
input_format_parquet_prefer_block_bytes 16744704
input_format_parquet_preserve_order 0
input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference 0
input_format_parquet_use_native_reader 0
input_format_protobuf_flatten_google_wrappers 0
input_format_protobuf_skip_fields_with_unsupported_types_in_schema_inference 0
input_format_record_errors_file_path
input_format_skip_unknown_fields 1
input_format_try_infer_dates 1
input_format_try_infer_datetimes 1
input_format_try_infer_exponent_floats 0
input_format_try_infer_integers 1
input_format_tsv_allow_variable_number_of_columns 0
input_format_tsv_crlf_end_of_line 0
input_format_tsv_detect_header 1
input_format_tsv_empty_as_default 0
input_format_tsv_enum_as_number 0
@ -450,7 +528,12 @@ joined_subquery_requires_alias 1
kafka_disable_num_consumers_limit 0
kafka_max_wait_ms 5000
keeper_map_strict_mode 0
keeper_max_retries 10
keeper_retry_initial_backoff_ms 100
keeper_retry_max_backoff_ms 5000
legacy_column_name_of_tuple_literal 0
lightweight_deletes_sync 2
lightweight_mutation_projection_mode throw
limit 0
live_view_heartbeat_interval 15
load_balancing random
@ -461,7 +544,7 @@ local_filesystem_read_prefetch 0
lock_acquire_timeout 120
log_comment
log_formatted_queries 0
log_processors_profiles 0
log_processors_profiles 1
log_profile_events 1
log_queries 1
log_queries_cut_to_length 100000
@ -474,6 +557,8 @@ log_query_views 1
low_cardinality_allow_in_native_format 1
low_cardinality_max_dictionary_size 8192
low_cardinality_use_single_dictionary_for_part 0
materialize_skip_indexes_on_insert 1
materialize_statistics_on_insert 1
materialize_ttl_after_modify 1
materialized_views_ignore_errors 0
max_alter_threads \'auto(16)\'
@ -501,6 +586,7 @@ max_distributed_depth 5
max_download_buffer_size 10485760
max_download_threads 4
max_entries_for_hash_table_stats 10000
max_estimated_execution_time 0
max_execution_speed 0
max_execution_speed_bytes 0
max_execution_time 0
@ -528,7 +614,9 @@ max_network_bandwidth_for_user 0
max_network_bytes 0
max_number_of_partitions_for_independent_aggregation 128
max_parallel_replicas 1
max_parser_backtracks 1000000
max_parser_depth 1000
max_parsing_threads \'auto(16)\'
max_partition_size_to_drop 50000000000
max_partitions_per_insert_block 100
max_partitions_to_read -1
@ -537,6 +625,7 @@ max_query_size 262144
max_read_buffer_size 1048576
max_read_buffer_size_local_fs 131072
max_read_buffer_size_remote_fs 0
max_recursive_cte_evaluation_depth 1000
max_remote_read_network_bandwidth 0
max_remote_read_network_bandwidth_for_server 0
max_remote_write_network_bandwidth 0
@ -549,7 +638,7 @@ max_result_rows 0
max_rows_in_distinct 0
max_rows_in_join 0
max_rows_in_set 0
max_rows_in_set_to_optimize_join 100000
max_rows_in_set_to_optimize_join 0
max_rows_to_group_by 0
max_rows_to_read 0
max_rows_to_read_leaf 0
@ -557,6 +646,7 @@ max_rows_to_sort 0
max_rows_to_transfer 0
max_sessions_for_user 0
max_size_to_preallocate_for_aggregation 100000000
max_size_to_preallocate_for_joins 100000000
max_streams_for_merge_tree_reading 0
max_streams_multiplier_for_merge_tables 5
max_streams_to_max_threads_ratio 1
@ -592,6 +682,7 @@ merge_tree_min_bytes_per_task_for_remote_reading 4194304
merge_tree_min_rows_for_concurrent_read 163840
merge_tree_min_rows_for_concurrent_read_for_remote_filesystem 163840
merge_tree_min_rows_for_seek 0
merge_tree_read_split_ranges_into_intersecting_and_non_intersecting_injection_probability 0
merge_tree_use_const_size_tasks_for_remote_reading 1
metrics_perf_events_enabled 0
metrics_perf_events_list
@ -604,6 +695,8 @@ min_count_to_compile_expression 3
min_count_to_compile_sort_description 3
min_execution_speed 0
min_execution_speed_bytes 0
min_external_table_block_size_bytes 268402944
min_external_table_block_size_rows 1048449
min_free_disk_space_for_temporary_data 0
min_hit_rate_to_use_consecutive_keys_optimization 0.5
min_insert_block_size_bytes 268402944
@ -619,8 +712,8 @@ mutations_execute_subqueries_on_initiator 0
mutations_max_literal_size_to_replace 16384
mutations_sync 0
mysql_datatypes_support_level
mysql_map_fixed_string_to_text_in_show_columns 0
mysql_map_string_to_text_in_show_columns 0
mysql_map_fixed_string_to_text_in_show_columns 1
mysql_map_string_to_text_in_show_columns 1
mysql_max_rows_to_insert 65536
network_compression_method LZ4
network_zstd_compression_level 1
@ -647,6 +740,7 @@ optimize_group_by_constant_keys 1
optimize_group_by_function_keys 1
optimize_if_chain_to_multiif 0
optimize_if_transform_strings_to_enum 0
optimize_injective_functions_in_group_by 1
optimize_injective_functions_inside_uniq 1
optimize_min_equality_disjunction_chain_length 3
optimize_min_inequality_conjunction_chain_length 3
@ -664,7 +758,7 @@ optimize_redundant_functions_in_order_by 1
optimize_respect_aliases 1
optimize_rewrite_aggregate_function_with_if 1
optimize_rewrite_array_exists_to_has 0
optimize_rewrite_sum_if_to_count_if 0
optimize_rewrite_sum_if_to_count_if 1
optimize_skip_merged_partitions 0
optimize_skip_unused_shards 0
optimize_skip_unused_shards_limit 1000
@ -674,9 +768,10 @@ optimize_sorting_by_input_stream_properties 1
optimize_substitute_columns 0
optimize_syntax_fuse_functions 0
optimize_throw_if_noop 0
optimize_time_filter_with_preimage 1
optimize_trivial_approximate_count_query 0
optimize_trivial_count_query 1
optimize_trivial_insert_select 1
optimize_trivial_insert_select 0
optimize_uniq_to_count 1
optimize_use_implicit_projections 1
optimize_use_projections 1
@ -685,13 +780,19 @@ os_thread_priority 0
output_format_arrow_compression_method lz4_frame
output_format_arrow_fixed_string_as_fixed_byte_array 1
output_format_arrow_low_cardinality_as_dictionary 0
output_format_arrow_string_as_string 0
output_format_arrow_string_as_string 1
output_format_arrow_use_64_bit_indexes_for_dictionary 0
output_format_arrow_use_signed_indexes_for_dictionary 1
output_format_avro_codec
output_format_avro_rows_in_file 1
output_format_avro_string_column_pattern
output_format_avro_sync_interval 16384
output_format_binary_encode_types_in_binary_format 0
output_format_bson_string_as_string 0
output_format_compression_level 3
output_format_compression_zstd_window_log 0
output_format_csv_crlf_end_of_line 0
output_format_csv_serialize_tuple_into_separate_columns 1
output_format_decimal_trailing_zeros 0
output_format_enable_streaming 0
output_format_json_array_of_rows 0
@ -705,27 +806,34 @@ output_format_json_skip_null_value_in_named_tuples 0
output_format_json_validate_utf8 0
output_format_markdown_escape_special_characters 0
output_format_msgpack_uuid_representation ext
output_format_orc_compression_method lz4
output_format_native_encode_types_in_binary_format 0
output_format_orc_compression_method zstd
output_format_orc_row_index_stride 10000
output_format_orc_string_as_string 0
output_format_orc_string_as_string 1
output_format_parallel_formatting 1
output_format_parquet_batch_size 1024
output_format_parquet_compliant_nested_types 1
output_format_parquet_compression_method lz4
output_format_parquet_compression_method zstd
output_format_parquet_data_page_size 1048576
output_format_parquet_fixed_string_as_fixed_byte_array 1
output_format_parquet_parallel_encoding 1
output_format_parquet_row_group_size 1000000
output_format_parquet_row_group_size_bytes 536870912
output_format_parquet_string_as_string 0
output_format_parquet_use_custom_encoder 0
output_format_parquet_string_as_string 1
output_format_parquet_use_custom_encoder 1
output_format_parquet_version 2.latest
output_format_pretty_color 1
output_format_parquet_write_page_index 1
output_format_pretty_color auto
output_format_pretty_display_footer_column_names 1
output_format_pretty_display_footer_column_names_min_rows 50
output_format_pretty_grid_charset UTF-8
output_format_pretty_highlight_digit_groups 1
output_format_pretty_max_column_pad_width 250
output_format_pretty_max_rows 10000
output_format_pretty_max_value_width 10000
output_format_pretty_row_numbers 0
output_format_pretty_max_value_width_apply_for_single_value 0
output_format_pretty_row_numbers 1
output_format_pretty_single_large_number_tip_threshold 1000000
output_format_protobuf_nullables_with_google_wrappers 0
output_format_schema
output_format_sql_insert_include_column_names 1
@ -734,15 +842,22 @@ output_format_sql_insert_quote_names 1
output_format_sql_insert_table_name table
output_format_sql_insert_use_replace 0
output_format_tsv_crlf_end_of_line 0
output_format_values_escape_quote_with_quote 0
output_format_write_statistics 1
page_cache_inject_eviction 0
parallel_distributed_insert_select 0
parallel_replica_offset 0
parallel_replicas_allow_in_with_subquery 1
parallel_replicas_count 0
parallel_replicas_custom_key
parallel_replicas_custom_key_filter_type default
parallel_replicas_custom_key_range_lower 0
parallel_replicas_custom_key_range_upper 0
parallel_replicas_for_non_replicated_merge_tree 0
parallel_replicas_mark_segment_size 128
parallel_replicas_min_number_of_granules_to_enable 0
parallel_replicas_min_number_of_rows_per_replica 0
parallel_replicas_prefer_local_join 1
parallel_replicas_single_task_marks_count_multiplier 2
parallel_view_processing 0
parallelize_output_from_storages 1
@ -755,11 +870,14 @@ parts_to_delay_insert 0
parts_to_throw_insert 0
periodic_live_view_refresh 60
poll_interval 10
postgresql_connection_attempt_timeout 2
postgresql_connection_pool_auto_close_connection 0
postgresql_connection_pool_retries 2
postgresql_connection_pool_size 16
postgresql_connection_pool_wait_timeout 5000
precise_float_parsing 0
prefer_column_name_to_alias 0
prefer_external_sort_block_bytes 16744704
prefer_global_in_and_join 0
prefer_localhost_replica 1
prefer_warmed_unmerged_parts_seconds 0
@ -767,7 +885,7 @@ preferred_block_size_bytes 1000000
preferred_max_column_in_block_size_bytes 0
preferred_optimize_projection_name
prefetch_buffer_size 1048576
print_pretty_type_names 0
print_pretty_type_names 1
priority 0
query_cache_compress_entries 1
query_cache_max_entries 0
@ -778,8 +896,10 @@ query_cache_nondeterministic_function_handling throw
query_cache_share_between_users 0
query_cache_squash_partial_results 1
query_cache_store_results_of_queries_with_nondeterministic_functions 0
query_cache_system_table_handling throw
query_cache_ttl 60
query_plan_aggregation_in_order 1
query_plan_convert_outer_join_to_inner_join 1
query_plan_enable_multithreading_after_window_functions 1
query_plan_enable_optimizations 1
query_plan_execute_functions_after_sorting 1
@ -788,6 +908,8 @@ query_plan_lift_up_array_join 1
query_plan_lift_up_union 1
query_plan_max_optimizations_to_apply 10000
query_plan_merge_expressions 1
query_plan_merge_filters 0
query_plan_optimize_prewhere 1
query_plan_optimize_primary_key 1
query_plan_optimize_projection 1
query_plan_push_down_limit 1
@ -806,7 +928,9 @@ read_backoff_min_events 2
read_backoff_min_interval_between_events_ms 1000
read_backoff_min_latency_ms 1000
read_from_filesystem_cache_if_exists_otherwise_bypass_cache 0
read_from_page_cache_if_exists_otherwise_bypass_cache 0
read_in_order_two_level_merge_threshold 100
read_in_order_use_buffering 1
read_overflow_mode throw
read_overflow_mode_leaf throw
read_priority 0
@ -835,17 +959,20 @@ result_overflow_mode throw
rewrite_count_distinct_if_with_count_distinct_implementation 0
s3_allow_parallel_part_upload 1
s3_check_objects_after_upload 0
s3_connect_timeout_ms 1000
s3_create_new_file_on_insert 0
s3_disable_checksum 0
s3_http_connection_pool_size 1000
s3_ignore_file_doesnt_exist 0
s3_list_object_keys_size 1000
s3_max_connections 1024
s3_max_get_burst 0
s3_max_get_rps 0
s3_max_inflight_parts_for_one_file 20
s3_max_part_number 10000
s3_max_put_burst 0
s3_max_put_rps 0
s3_max_redirects 10
s3_max_single_operation_copy_size 33554432
s3_max_single_part_upload_size 33554432
s3_max_single_read_retries 4
s3_max_unexpected_write_error_retries 4
@ -860,6 +987,8 @@ s3_truncate_on_insert 0
s3_upload_part_size_multiply_factor 2
s3_upload_part_size_multiply_parts_count_threshold 500
s3_use_adaptive_timeouts 1
s3_validate_request_settings 1
s3queue_allow_experimental_sharded_mode 0
s3queue_default_zookeeper_path /clickhouse/s3queue/
s3queue_enable_logging_to_s3queue_log 0
schema_inference_cache_require_modification_time_for_url 1
@ -887,6 +1016,8 @@ sleep_after_receiving_query_ms 0
sleep_in_send_data_ms 0
sleep_in_send_tables_status_ms 0
sort_overflow_mode throw
split_intersecting_parts_ranges_into_layers_final 1
split_parts_ranges_into_intersecting_and_non_intersecting_final 1
splitby_max_substrings_includes_remaining_string 0
stop_refreshable_materialized_views_on_startup 0
storage_file_read_method pread
@ -898,8 +1029,10 @@ stream_poll_timeout_ms 500
system_events_show_zero_values 0
table_function_remote_max_addresses 1000
tcp_keep_alive_timeout 290
temporary_data_in_cache_reserve_space_wait_lock_timeout_milliseconds 600000
temporary_files_codec LZ4
temporary_live_view_timeout 1
throw_if_deduplication_in_dependent_materialized_views_enabled_with_async_insert 1
throw_if_no_data_to_insert 1
throw_on_error_from_cache_on_write_operations 0
throw_on_max_partitions_per_insert_block 1
@ -912,8 +1045,10 @@ totals_mode after_having_exclusive
trace_profile_events 0
transfer_overflow_mode throw
transform_null_in 0
traverse_shadow_remote_data_paths 0
union_default_mode
unknown_packet_in_send_data 0
update_insert_deduplication_token_in_dependent_materialized_views 0
use_cache_for_count_from_files 1
use_client_time_zone 0
use_compact_format_in_distributed_parts_names 1
@ -923,12 +1058,15 @@ use_index_for_in_with_subqueries 1
use_index_for_in_with_subqueries_max_values 0
use_local_cache_for_remote_storage 1
use_mysql_types_in_show_columns 0
use_page_cache_for_disks_without_file_cache 0
use_query_cache 0
use_skip_indexes 1
use_skip_indexes_if_final 0
use_structure_from_insertion_table_in_table_functions 2
use_uncompressed_cache 0
use_variant_as_common_type 0
use_with_fill_by_sorting_prefix 1
validate_experimental_and_suspicious_types_inside_nested_types 1
validate_polygons 1
wait_changes_become_visible_after_commit_mode wait_unknown
wait_for_async_insert 1
1 add_http_cors_header 0
11 allow_custom_error_code_in_throwif 0
12 allow_ddl 1
13 allow_deprecated_database_ordinary 0
14 allow_deprecated_error_prone_window_functions 0
15 allow_deprecated_snowflake_conversion_functions 0
16 allow_deprecated_syntax_for_merge_tree 0
17 allow_distributed_ddl 1
18 allow_drop_detached 0
19 allow_execute_multiif_columnar 1
20 allow_experimental_alter_materialized_view_structure 1
21 allow_experimental_analyzer 0 1
22 allow_experimental_annoy_index 0
23 allow_experimental_bigint_types 1
24 allow_experimental_codecs 0
25 allow_experimental_database_atomic 1
26 allow_experimental_database_materialized_mysql 0
27 allow_experimental_database_materialized_postgresql 0
28 allow_experimental_database_replicated 0 1
29 allow_experimental_dynamic_type 0
30 allow_experimental_full_text_index 0
31 allow_experimental_funnel_functions 0
32 allow_experimental_geo_types 1
33 allow_experimental_hash_functions 0
34 allow_experimental_inverted_index 0
35 allow_experimental_join_condition 0
36 allow_experimental_lightweight_delete 1
37 allow_experimental_live_view 0
38 allow_experimental_map_type 1
45 allow_experimental_query_deduplication 0
46 allow_experimental_refreshable_materialized_view 0
47 allow_experimental_s3queue 1
48 allow_experimental_shared_merge_tree 0 1
49 allow_experimental_statistic 0
50 allow_experimental_statistics 0
51 allow_experimental_undrop_table_query 1
52 allow_experimental_usearch_index 0
53 allow_experimental_variant_type 0
54 allow_experimental_window_functions 1
55 allow_experimental_window_view 0
56 allow_get_client_http_header 0
57 allow_hyperscan 1
58 allow_introspection_functions 0
59 allow_named_collection_override_by_default 1
66 allow_push_predicate_when_subquery_contains_with 1
67 allow_settings_after_format_in_insert 0
68 allow_simdjson 1
69 allow_statistic_optimize 0
70 allow_statistics_optimize 0
71 allow_suspicious_codecs 0
72 allow_suspicious_fixed_string_types 0
73 allow_suspicious_indices 0
74 allow_suspicious_low_cardinality_types 0
75 allow_suspicious_primary_key 0
76 allow_suspicious_ttl_expressions 0
77 allow_suspicious_variant_types 0
78 allow_unrestricted_reads_from_keeper 0
79 alter_move_to_space_execute_async 0
80 alter_partition_verbose_result 0
81 alter_sync 1
82 analyze_index_with_space_filling_curves 1
83 analyzer_compatibility_join_using_top_level_identifier 0
84 annoy_index_search_k_nodes -1
85 any_join_distinct_right_table_keys 0
86 apply_deleted_mask 1
88 asterisk_include_alias_columns 0
89 asterisk_include_materialized_columns 0
90 async_insert 0
91 async_insert_busy_timeout_decrease_rate 0.2
92 async_insert_busy_timeout_increase_rate 0.2
93 async_insert_busy_timeout_max_ms 200
94 async_insert_busy_timeout_min_ms 50
95 async_insert_busy_timeout_ms 200
96 async_insert_cleanup_timeout_ms 1000
97 async_insert_deduplicate 0
98 async_insert_max_data_size 1000000 10485760
99 async_insert_max_query_number 450
100 async_insert_poll_timeout_ms 10
101 async_insert_stale_timeout_ms 0
102 async_insert_threads 16
103 async_insert_use_adaptive_busy_timeout 1
104 async_query_sending_for_remote 1
105 async_socket_for_remote 1
106 azure_allow_parallel_part_upload 1
107 azure_create_new_file_on_insert 0
108 azure_ignore_file_doesnt_exist 0
109 azure_list_object_keys_size 1000
110 azure_max_blocks_in_multipart_upload 50000
111 azure_max_inflight_parts_for_one_file 20
112 azure_max_single_part_copy_size 268435456
113 azure_max_single_part_upload_size 104857600
114 azure_max_single_read_retries 4
115 azure_max_unexpected_write_error_retries 4
116 azure_max_upload_part_size 5368709120
117 azure_min_upload_part_size 16777216
118 azure_sdk_max_retries 10
119 azure_sdk_retry_initial_backoff_ms 10
120 azure_sdk_retry_max_backoff_ms 1000
121 azure_skip_empty_files 0
122 azure_strict_upload_part_size 0
123 azure_throw_on_zero_files_match 0
124 azure_truncate_on_insert 0
125 azure_upload_part_size_multiply_factor 2
126 azure_upload_part_size_multiply_parts_count_threshold 500
127 background_buffer_flush_schedule_pool_size 16
128 background_common_pool_size 8
129 background_distributed_schedule_pool_size 16
141 backup_restore_keeper_retry_initial_backoff_ms 100
142 backup_restore_keeper_retry_max_backoff_ms 5000
143 backup_restore_keeper_value_max_size 1048576
144 backup_restore_s3_retry_attempts 1000
145 backup_threads 16
146 bool_false_representation false
147 bool_true_representation true
150 cancel_http_readonly_queries_on_client_close 0
151 cast_ipv4_ipv6_default_on_conversion_error 0
152 cast_keep_nullable 0
153 cast_string_to_dynamic_use_inference 0
154 check_query_single_value_result 1
155 check_referential_table_dependencies 0
156 check_table_dependencies 1
159 cloud_mode_engine 1
160 cluster_for_parallel_replicas
161 collect_hash_table_stats_during_aggregation 1
162 collect_hash_table_stats_during_joins 1
163 column_names_for_schema_inference
164 compatibility
165 compatibility_ignore_auto_increment_in_create_table 0
178 create_index_ignore_unique 0
179 create_replicated_merge_tree_fault_injection_probability 0
180 create_table_empty_primary_key_by_default 0
181 cross_join_min_bytes_to_compress 1073741824
182 cross_join_min_rows_to_compress 10000000
183 cross_to_inner_join_rewrite 1
184 data_type_default_nullable 0
185 database_atomic_wait_for_drop_and_detach_synchronously 0
186 database_replicated_allow_heavy_create 0
187 database_replicated_allow_only_replicated_engine 0
188 database_replicated_allow_replicated_engine_arguments 1
189 database_replicated_always_detach_permanently 0
196 decimal_check_overflow 1
197 deduplicate_blocks_in_dependent_materialized_views 0
198 default_database_engine Atomic
199 default_materialized_view_sql_security DEFINER
200 default_max_bytes_in_join 1000000000
201 default_table_engine default_normal_view_sql_security None INVOKER
202 default_table_engine MergeTree
203 default_temporary_table_engine Memory
204 default_view_definer CURRENT_USER
205 describe_compact_output 0
206 describe_extend_object_types 0
207 describe_include_subcolumns 0
208 describe_include_virtual_columns 0
209 dialect clickhouse
210 dictionary_use_async_executor 0
211 dictionary_validate_primary_key_type 0
212 distinct_overflow_mode throw
213 distributed_aggregation_memory_efficient 1
214 distributed_background_insert_batch 0
226 distributed_directory_monitor_split_batch_on_failure 0
227 distributed_foreground_insert 0
228 distributed_group_by_no_merge 0
229 distributed_insert_skip_read_only_replicas 0
230 distributed_product_mode deny
231 distributed_push_down_limit 1
232 distributed_replica_error_cap 1000
236 drain_timeout 3
237 empty_result_for_aggregation_by_constant_keys_on_empty_set 1
238 empty_result_for_aggregation_by_empty_set 0
239 enable_blob_storage_log 1
240 enable_debug_queries 0
241 enable_deflate_qpl_codec 0
242 enable_early_constant_folding 1
251 enable_lightweight_delete 1
252 enable_memory_bound_merging_of_aggregation_results 1
253 enable_multiple_prewhere_read_steps 1
254 enable_named_columns_in_function_tuple 1
255 enable_optimize_predicate_expression 1
256 enable_optimize_predicate_expression_to_final_subquery 1
257 enable_order_by_all 1
263 enable_software_prefetch_in_aggregation 1
264 enable_unaligned_array_join 0
265 enable_url_encoding 1
266 enable_vertical_final 1
267 enable_writes_to_query_cache 1
268 enable_zstd_qat_codec 0
269 engine_file_allow_create_multiple_files 0
270 engine_file_empty_if_not_exists 0
271 engine_file_skip_empty_files 0
280 external_storage_rw_timeout_sec 300
281 external_table_functions_use_nulls 1
282 external_table_strict_query 0
283 extract_key_value_pairs_max_pairs_per_row 1000
284 extract_kvp_max_pairs_per_row 1000
285 extremes 0
286 fallback_to_stale_replicas_for_distributed_queries 1
287 filesystem_cache_max_download_size 137438953472
288 filesystem_cache_reserve_space_wait_lock_timeout_milliseconds 1000
289 filesystem_cache_segments_batch_size 20
290 filesystem_prefetch_max_memory_usage 1073741824
291 filesystem_prefetch_min_bytes_for_single_read_task 2097152
329 format_regexp_skip_unmatched 0
330 format_schema
331 format_template_resultset
332 format_template_resultset_format
333 format_template_row
334 format_template_row_format
335 format_template_rows_between_delimiter \n
336 format_tsv_null_representation \\N
337 formatdatetime_f_prints_single_zero 0
341 function_implementation
342 function_json_value_return_type_allow_complex 0
343 function_json_value_return_type_allow_nullable 0
344 function_locate_has_mysql_compatible_argument_order 1
345 function_range_max_elements_in_block 500000000
346 function_sleep_max_microseconds_per_block 3000000
347 function_visible_width_behavior 1
348 geo_distance_returns_float64_on_float64_arguments 1
349 glob_expansion_max_elements 1000
350 grace_hash_join_initial_buckets 1
351 grace_hash_join_max_buckets 1024
356 handle_kafka_error_mode default
357 handshake_timeout_ms 10000
358 hdfs_create_new_file_on_insert 0
359 hdfs_ignore_file_doesnt_exist 0
360 hdfs_replication 0
361 hdfs_skip_empty_files 0
362 hdfs_throw_on_zero_files_match 0
363 hdfs_truncate_on_insert 0
364 hedged_connection_timeout_ms 50
365 hsts_max_age 0
384 http_wait_end_of_query 0
385 http_write_exception_in_output_format 1
386 http_zlib_compression_level 3
387 iceberg_engine_ignore_schema_evolution 0
388 idle_connection_timeout 3600
389 ignore_cold_parts_seconds 0
390 ignore_data_skipping_indices
391 ignore_drop_queries_probability 0
392 ignore_materialized_views_with_dropped_target_table 0
393 ignore_on_cluster_for_replicated_access_entities_queries 0
394 ignore_on_cluster_for_replicated_named_collections_queries 0
395 ignore_on_cluster_for_replicated_udf_queries 0
396 implicit_transaction 0
397 input_format_allow_errors_num 0
403 input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference 0
404 input_format_avro_allow_missing_fields 0
405 input_format_avro_null_as_default 0
406 input_format_binary_decode_types_in_binary_format 0
407 input_format_bson_skip_fields_with_unsupported_types_in_schema_inference 0
408 input_format_capn_proto_skip_fields_with_unsupported_types_in_schema_inference 0
409 input_format_csv_allow_cr_end_of_line 0
410 input_format_csv_allow_variable_number_of_columns 0
411 input_format_csv_allow_whitespace_or_tab_as_delimiter 0
412 input_format_csv_arrays_as_nested_csv 0
413 input_format_csv_deserialize_separate_columns_into_tuple 1
414 input_format_csv_detect_header 1
415 input_format_csv_empty_as_default 1
416 input_format_csv_enum_as_number 0
418 input_format_csv_skip_trailing_empty_lines 0
419 input_format_csv_trim_whitespaces 1
420 input_format_csv_try_infer_numbers_from_strings 0
421 input_format_csv_try_infer_strings_from_quoted_tuples 1
422 input_format_csv_use_best_effort_in_schema_inference 1
423 input_format_csv_use_default_on_bad_values 0
424 input_format_custom_allow_variable_number_of_columns 0
425 input_format_custom_detect_header 1
426 input_format_custom_skip_trailing_empty_lines 0
427 input_format_defaults_for_omitted_fields 1
428 input_format_force_null_for_omitted_fields 0
429 input_format_hive_text_allow_variable_number_of_columns 1
430 input_format_hive_text_collection_items_delimiter 
431 input_format_hive_text_fields_delimiter 
432 input_format_hive_text_map_keys_delimiter 
433 input_format_import_nested_json 0
434 input_format_ipv4_default_on_conversion_error 0
435 input_format_ipv6_default_on_conversion_error 0
436 input_format_json_case_insensitive_column_matching 0
437 input_format_json_compact_allow_variable_number_of_columns 0
438 input_format_json_defaults_for_missing_elements_in_named_tuple 1
439 input_format_json_ignore_unknown_keys_in_named_tuple 1
440 input_format_json_ignore_unnecessary_fields 1
441 input_format_json_infer_incomplete_types_as_strings 1
442 input_format_json_named_tuples_as_objects 1
443 input_format_json_read_arrays_as_strings 1
444 input_format_json_read_bools_as_numbers 1
445 input_format_json_read_bools_as_strings 1
446 input_format_json_read_numbers_as_strings 1
447 input_format_json_read_objects_as_strings 1
448 input_format_json_throw_on_bad_escape_sequence 1
449 input_format_json_try_infer_named_tuples_from_objects 1
450 input_format_json_try_infer_numbers_from_strings 0
451 input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects 0
452 input_format_json_validate_types_from_metadata 1
453 input_format_max_bytes_to_read_for_schema_inference 33554432
454 input_format_max_rows_to_read_for_schema_inference 25000
456 input_format_mysql_dump_map_column_names 1
457 input_format_mysql_dump_table_name
458 input_format_native_allow_types_conversion 1
459 input_format_native_decode_types_in_binary_format 0
460 input_format_null_as_default 1
461 input_format_orc_allow_missing_columns 1
462 input_format_orc_case_insensitive_column_matching 0
463 input_format_orc_filter_push_down 1
464 input_format_orc_import_nested 0
465 input_format_orc_reader_time_zone_name GMT
466 input_format_orc_row_batch_size 100000
467 input_format_orc_skip_columns_with_unsupported_types_in_schema_inference 0
468 input_format_orc_use_fast_decoder 1
472 input_format_parquet_filter_push_down 1
473 input_format_parquet_import_nested 0
474 input_format_parquet_local_file_min_bytes_for_seek 8192
475 input_format_parquet_max_block_size 8192 65409
476 input_format_parquet_prefer_block_bytes 16744704
477 input_format_parquet_preserve_order 0
478 input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference 0
479 input_format_parquet_use_native_reader 0
480 input_format_protobuf_flatten_google_wrappers 0
481 input_format_protobuf_skip_fields_with_unsupported_types_in_schema_inference 0
482 input_format_record_errors_file_path
483 input_format_skip_unknown_fields 1
484 input_format_try_infer_dates 1
485 input_format_try_infer_datetimes 1
486 input_format_try_infer_exponent_floats 0
487 input_format_try_infer_integers 1
488 input_format_tsv_allow_variable_number_of_columns 0
489 input_format_tsv_crlf_end_of_line 0
490 input_format_tsv_detect_header 1
491 input_format_tsv_empty_as_default 0
492 input_format_tsv_enum_as_number 0
528 kafka_disable_num_consumers_limit 0
529 kafka_max_wait_ms 5000
530 keeper_map_strict_mode 0
531 keeper_max_retries 10
532 keeper_retry_initial_backoff_ms 100
533 keeper_retry_max_backoff_ms 5000
534 legacy_column_name_of_tuple_literal 0
535 lightweight_deletes_sync 2
536 lightweight_mutation_projection_mode throw
537 limit 0
538 live_view_heartbeat_interval 15
539 load_balancing random
544 lock_acquire_timeout 120
545 log_comment
546 log_formatted_queries 0
547 log_processors_profiles 0 1
548 log_profile_events 1
549 log_queries 1
550 log_queries_cut_to_length 100000
557 low_cardinality_allow_in_native_format 1
558 low_cardinality_max_dictionary_size 8192
559 low_cardinality_use_single_dictionary_for_part 0
560 materialize_skip_indexes_on_insert 1
561 materialize_statistics_on_insert 1
562 materialize_ttl_after_modify 1
563 materialized_views_ignore_errors 0
564 max_alter_threads \'auto(16)\'
586 max_download_buffer_size 10485760
587 max_download_threads 4
588 max_entries_for_hash_table_stats 10000
589 max_estimated_execution_time 0
590 max_execution_speed 0
591 max_execution_speed_bytes 0
592 max_execution_time 0
614 max_network_bytes 0
615 max_number_of_partitions_for_independent_aggregation 128
616 max_parallel_replicas 1
617 max_parser_backtracks 1000000
618 max_parser_depth 1000
619 max_parsing_threads \'auto(16)\'
620 max_partition_size_to_drop 50000000000
621 max_partitions_per_insert_block 100
622 max_partitions_to_read -1
625 max_read_buffer_size 1048576
626 max_read_buffer_size_local_fs 131072
627 max_read_buffer_size_remote_fs 0
628 max_recursive_cte_evaluation_depth 1000
629 max_remote_read_network_bandwidth 0
630 max_remote_read_network_bandwidth_for_server 0
631 max_remote_write_network_bandwidth 0
638 max_rows_in_distinct 0
639 max_rows_in_join 0
640 max_rows_in_set 0
641 max_rows_in_set_to_optimize_join 100000 0
642 max_rows_to_group_by 0
643 max_rows_to_read 0
644 max_rows_to_read_leaf 0
646 max_rows_to_transfer 0
647 max_sessions_for_user 0
648 max_size_to_preallocate_for_aggregation 100000000
649 max_size_to_preallocate_for_joins 100000000
650 max_streams_for_merge_tree_reading 0
651 max_streams_multiplier_for_merge_tables 5
652 max_streams_to_max_threads_ratio 1
682 merge_tree_min_rows_for_concurrent_read 163840
683 merge_tree_min_rows_for_concurrent_read_for_remote_filesystem 163840
684 merge_tree_min_rows_for_seek 0
685 merge_tree_read_split_ranges_into_intersecting_and_non_intersecting_injection_probability 0
686 merge_tree_use_const_size_tasks_for_remote_reading 1
687 metrics_perf_events_enabled 0
688 metrics_perf_events_list
695 min_count_to_compile_sort_description 3
696 min_execution_speed 0
697 min_execution_speed_bytes 0
698 min_external_table_block_size_bytes 268402944
699 min_external_table_block_size_rows 1048449
700 min_free_disk_space_for_temporary_data 0
701 min_hit_rate_to_use_consecutive_keys_optimization 0.5
702 min_insert_block_size_bytes 268402944
712 mutations_max_literal_size_to_replace 16384
713 mutations_sync 0
714 mysql_datatypes_support_level
715 mysql_map_fixed_string_to_text_in_show_columns 0 1
716 mysql_map_string_to_text_in_show_columns 0 1
717 mysql_max_rows_to_insert 65536
718 network_compression_method LZ4
719 network_zstd_compression_level 1
740 optimize_group_by_function_keys 1
741 optimize_if_chain_to_multiif 0
742 optimize_if_transform_strings_to_enum 0
743 optimize_injective_functions_in_group_by 1
744 optimize_injective_functions_inside_uniq 1
745 optimize_min_equality_disjunction_chain_length 3
746 optimize_min_inequality_conjunction_chain_length 3
758 optimize_respect_aliases 1
759 optimize_rewrite_aggregate_function_with_if 1
760 optimize_rewrite_array_exists_to_has 0
761 optimize_rewrite_sum_if_to_count_if 0 1
762 optimize_skip_merged_partitions 0
763 optimize_skip_unused_shards 0
764 optimize_skip_unused_shards_limit 1000
768 optimize_substitute_columns 0
769 optimize_syntax_fuse_functions 0
770 optimize_throw_if_noop 0
771 optimize_time_filter_with_preimage 1
772 optimize_trivial_approximate_count_query 0
773 optimize_trivial_count_query 1
774 optimize_trivial_insert_select 1 0
775 optimize_uniq_to_count 1
776 optimize_use_implicit_projections 1
777 optimize_use_projections 1
780 output_format_arrow_compression_method lz4_frame
781 output_format_arrow_fixed_string_as_fixed_byte_array 1
782 output_format_arrow_low_cardinality_as_dictionary 0
783 output_format_arrow_string_as_string 0 1
784 output_format_arrow_use_64_bit_indexes_for_dictionary 0
785 output_format_arrow_use_signed_indexes_for_dictionary 1
786 output_format_avro_codec
787 output_format_avro_rows_in_file 1
788 output_format_avro_string_column_pattern
789 output_format_avro_sync_interval 16384
790 output_format_binary_encode_types_in_binary_format 0
791 output_format_bson_string_as_string 0
792 output_format_compression_level 3
793 output_format_compression_zstd_window_log 0
794 output_format_csv_crlf_end_of_line 0
795 output_format_csv_serialize_tuple_into_separate_columns 1
796 output_format_decimal_trailing_zeros 0
797 output_format_enable_streaming 0
798 output_format_json_array_of_rows 0
806 output_format_json_validate_utf8 0
807 output_format_markdown_escape_special_characters 0
808 output_format_msgpack_uuid_representation ext
809 output_format_orc_compression_method output_format_native_encode_types_in_binary_format lz4 0
810 output_format_orc_compression_method zstd
811 output_format_orc_row_index_stride 10000
812 output_format_orc_string_as_string 0 1
813 output_format_parallel_formatting 1
814 output_format_parquet_batch_size 1024
815 output_format_parquet_compliant_nested_types 1
816 output_format_parquet_compression_method lz4 zstd
817 output_format_parquet_data_page_size 1048576
818 output_format_parquet_fixed_string_as_fixed_byte_array 1
819 output_format_parquet_parallel_encoding 1
820 output_format_parquet_row_group_size 1000000
821 output_format_parquet_row_group_size_bytes 536870912
822 output_format_parquet_string_as_string 0 1
823 output_format_parquet_use_custom_encoder 0 1
824 output_format_parquet_version 2.latest
825 output_format_pretty_color output_format_parquet_write_page_index 1
826 output_format_pretty_color auto
827 output_format_pretty_display_footer_column_names 1
828 output_format_pretty_display_footer_column_names_min_rows 50
829 output_format_pretty_grid_charset UTF-8
830 output_format_pretty_highlight_digit_groups 1
831 output_format_pretty_max_column_pad_width 250
832 output_format_pretty_max_rows 10000
833 output_format_pretty_max_value_width 10000
834 output_format_pretty_row_numbers output_format_pretty_max_value_width_apply_for_single_value 0
835 output_format_pretty_row_numbers 1
836 output_format_pretty_single_large_number_tip_threshold 1000000
837 output_format_protobuf_nullables_with_google_wrappers 0
838 output_format_schema
839 output_format_sql_insert_include_column_names 1
842 output_format_sql_insert_table_name table
843 output_format_sql_insert_use_replace 0
844 output_format_tsv_crlf_end_of_line 0
845 output_format_values_escape_quote_with_quote 0
846 output_format_write_statistics 1
847 page_cache_inject_eviction 0
848 parallel_distributed_insert_select 0
849 parallel_replica_offset 0
850 parallel_replicas_allow_in_with_subquery 1
851 parallel_replicas_count 0
852 parallel_replicas_custom_key
853 parallel_replicas_custom_key_filter_type default
854 parallel_replicas_custom_key_range_lower 0
855 parallel_replicas_custom_key_range_upper 0
856 parallel_replicas_for_non_replicated_merge_tree 0
857 parallel_replicas_mark_segment_size 128
858 parallel_replicas_min_number_of_granules_to_enable 0
859 parallel_replicas_min_number_of_rows_per_replica 0
860 parallel_replicas_prefer_local_join 1
861 parallel_replicas_single_task_marks_count_multiplier 2
862 parallel_view_processing 0
863 parallelize_output_from_storages 1
870 parts_to_throw_insert 0
871 periodic_live_view_refresh 60
872 poll_interval 10
873 postgresql_connection_attempt_timeout 2
874 postgresql_connection_pool_auto_close_connection 0
875 postgresql_connection_pool_retries 2
876 postgresql_connection_pool_size 16
877 postgresql_connection_pool_wait_timeout 5000
878 precise_float_parsing 0
879 prefer_column_name_to_alias 0
880 prefer_external_sort_block_bytes 16744704
881 prefer_global_in_and_join 0
882 prefer_localhost_replica 1
883 prefer_warmed_unmerged_parts_seconds 0
885 preferred_max_column_in_block_size_bytes 0
886 preferred_optimize_projection_name
887 prefetch_buffer_size 1048576
888 print_pretty_type_names 0 1
889 priority 0
890 query_cache_compress_entries 1
891 query_cache_max_entries 0
896 query_cache_share_between_users 0
897 query_cache_squash_partial_results 1
898 query_cache_store_results_of_queries_with_nondeterministic_functions 0
899 query_cache_system_table_handling throw
900 query_cache_ttl 60
901 query_plan_aggregation_in_order 1
902 query_plan_convert_outer_join_to_inner_join 1
903 query_plan_enable_multithreading_after_window_functions 1
904 query_plan_enable_optimizations 1
905 query_plan_execute_functions_after_sorting 1
908 query_plan_lift_up_union 1
909 query_plan_max_optimizations_to_apply 10000
910 query_plan_merge_expressions 1
911 query_plan_merge_filters 0
912 query_plan_optimize_prewhere 1
913 query_plan_optimize_primary_key 1
914 query_plan_optimize_projection 1
915 query_plan_push_down_limit 1
928 read_backoff_min_interval_between_events_ms 1000
929 read_backoff_min_latency_ms 1000
930 read_from_filesystem_cache_if_exists_otherwise_bypass_cache 0
931 read_from_page_cache_if_exists_otherwise_bypass_cache 0
932 read_in_order_two_level_merge_threshold 100
933 read_in_order_use_buffering 1
934 read_overflow_mode throw
935 read_overflow_mode_leaf throw
936 read_priority 0
959 rewrite_count_distinct_if_with_count_distinct_implementation 0
960 s3_allow_parallel_part_upload 1
961 s3_check_objects_after_upload 0
962 s3_connect_timeout_ms 1000
963 s3_create_new_file_on_insert 0
964 s3_disable_checksum 0
965 s3_http_connection_pool_size s3_ignore_file_doesnt_exist 1000 0
966 s3_list_object_keys_size 1000
967 s3_max_connections 1024
968 s3_max_get_burst 0
969 s3_max_get_rps 0
970 s3_max_inflight_parts_for_one_file 20
971 s3_max_part_number 10000
972 s3_max_put_burst 0
973 s3_max_put_rps 0
974 s3_max_redirects 10
975 s3_max_single_operation_copy_size 33554432
976 s3_max_single_part_upload_size 33554432
977 s3_max_single_read_retries 4
978 s3_max_unexpected_write_error_retries 4
987 s3_upload_part_size_multiply_factor 2
988 s3_upload_part_size_multiply_parts_count_threshold 500
989 s3_use_adaptive_timeouts 1
990 s3_validate_request_settings 1
991 s3queue_allow_experimental_sharded_mode 0
992 s3queue_default_zookeeper_path /clickhouse/s3queue/
993 s3queue_enable_logging_to_s3queue_log 0
994 schema_inference_cache_require_modification_time_for_url 1
1016 sleep_in_send_data_ms 0
1017 sleep_in_send_tables_status_ms 0
1018 sort_overflow_mode throw
1019 split_intersecting_parts_ranges_into_layers_final 1
1020 split_parts_ranges_into_intersecting_and_non_intersecting_final 1
1021 splitby_max_substrings_includes_remaining_string 0
1022 stop_refreshable_materialized_views_on_startup 0
1023 storage_file_read_method pread
1029 system_events_show_zero_values 0
1030 table_function_remote_max_addresses 1000
1031 tcp_keep_alive_timeout 290
1032 temporary_data_in_cache_reserve_space_wait_lock_timeout_milliseconds 600000
1033 temporary_files_codec LZ4
1034 temporary_live_view_timeout 1
1035 throw_if_deduplication_in_dependent_materialized_views_enabled_with_async_insert 1
1036 throw_if_no_data_to_insert 1
1037 throw_on_error_from_cache_on_write_operations 0
1038 throw_on_max_partitions_per_insert_block 1
1045 trace_profile_events 0
1046 transfer_overflow_mode throw
1047 transform_null_in 0
1048 traverse_shadow_remote_data_paths 0
1049 union_default_mode
1050 unknown_packet_in_send_data 0
1051 update_insert_deduplication_token_in_dependent_materialized_views 0
1052 use_cache_for_count_from_files 1
1053 use_client_time_zone 0
1054 use_compact_format_in_distributed_parts_names 1
1058 use_index_for_in_with_subqueries_max_values 0
1059 use_local_cache_for_remote_storage 1
1060 use_mysql_types_in_show_columns 0
1061 use_page_cache_for_disks_without_file_cache 0
1062 use_query_cache 0
1063 use_skip_indexes 1
1064 use_skip_indexes_if_final 0
1065 use_structure_from_insertion_table_in_table_functions 2
1066 use_uncompressed_cache 0
1067 use_variant_as_common_type 0
1068 use_with_fill_by_sorting_prefix 1
1069 validate_experimental_and_suspicious_types_inside_nested_types 1
1070 validate_polygons 1
1071 wait_changes_become_visible_after_commit_mode wait_unknown
1072 wait_for_async_insert 1

View File

@ -7,12 +7,12 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. "$CUR_DIR"/../shell_config.sh
# Note that this is a broad check. A per version check is done in the upgrade test
# Baseline generated with 23.12.1
# clickhouse local --query "select name, default from system.settings order by name format TSV" > 02995_baseline_23_12_1.tsv
# Baseline generated with 24.7.2
# clickhouse local --query "select name, default from system.settings order by name format TSV" > 02995_baseline_24_7_2.tsv
$CLICKHOUSE_LOCAL --query "
WITH old_settings AS
(
SELECT * FROM file('${CUR_DIR}/02995_baseline_23_12_1.tsv', 'TSV', 'name String, default String')
SELECT * FROM file('${CUR_DIR}/02995_baseline_24_7_2.tsv', 'TSV', 'name String, default String')
),
new_settings AS
(
@ -21,7 +21,7 @@ $CLICKHOUSE_LOCAL --query "
)
SELECT * FROM
(
SELECT 'PLEASE ADD THE NEW SETTING TO SettingsChangesHistory.h: ' || name || ' WAS ADDED',
SELECT 'PLEASE ADD THE NEW SETTING TO SettingsChangesHistory.cpp: ' || name || ' WAS ADDED',
FROM new_settings
WHERE (name NOT IN (
SELECT name
@ -29,17 +29,17 @@ $CLICKHOUSE_LOCAL --query "
)) AND (name NOT IN (
SELECT arrayJoin(tupleElement(changes, 'name'))
FROM system.settings_changes
WHERE splitByChar('.', version())[1] >= '24'
WHERE splitByChar('.', version)[1]::UInt64 >= 24 AND splitByChar('.', version)[2]::UInt64 > 7
))
UNION ALL
(
SELECT 'PLEASE ADD THE SETTING VALUE CHANGE TO SettingsChangesHistory.h: ' || name || ' WAS CHANGED FROM ' || old_settings.default || ' TO ' || new_settings.default,
SELECT 'PLEASE ADD THE SETTING VALUE CHANGE TO SettingsChangesHistory.cpp: ' || name || ' WAS CHANGED FROM ' || old_settings.default || ' TO ' || new_settings.default,
FROM new_settings
LEFT JOIN old_settings ON new_settings.name = old_settings.name
WHERE (new_settings.default != old_settings.default) AND (name NOT IN (
SELECT arrayJoin(tupleElement(changes, 'name'))
FROM system.settings_changes
WHERE splitByChar('.', version())[1] >= '24'
WHERE splitByChar('.', version)[1]::UInt64 >= 24 AND splitByChar('.', version)[2]::UInt64 > 7
))
)
)

View File

@ -5,29 +5,8 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
# Copies a test predefined backup from "/tests/queries/0_stateless/backups/" folder to the "backups" disk,
# returns the path to the backup relative to that disk.
function install_test_backup()
{
local test_backup_filename="$1"
local test_backup_path="$CURDIR/backups/${test_backup_filename}"
local backups_disk_root
backups_disk_root=$($CLICKHOUSE_CLIENT --query "SELECT path FROM system.disks WHERE name='backups'")
if [ -z "${backups_disk_root}" ]; then
echo "Disk '${backups_disk_root}' not found"
exit 1
fi
local install_path=${backups_disk_root}/${CLICKHOUSE_DATABASE}/${test_backup_filename}
mkdir -p "$(dirname "${install_path}")"
ln -s "${test_backup_path}" "${install_path}"
echo "${CLICKHOUSE_DATABASE}/${test_backup_filename}"
}
backup_name="$(install_test_backup old_backup_with_matview_inner_table_metadata.zip)"
# In this test we restore from "/tests/queries/0_stateless/backups/old_backup_with_matview_inner_table_metadata.zip"
backup_name="$($CURDIR/helpers/install_predefined_backup.sh old_backup_with_matview_inner_table_metadata.zip)"
$CLICKHOUSE_CLIENT --query "DROP TABLE IF EXISTS mv"
$CLICKHOUSE_CLIENT --query "DROP TABLE IF EXISTS src"

View File

@ -1,4 +1,5 @@
-- Tags: long
-- Tags: long, no-random-merge-tree-settings
-- no-random-merge-tree-settings - times out in private
DROP TABLE IF EXISTS build;
DROP TABLE IF EXISTS skewed_probe;

View File

@ -0,0 +1,2 @@
RESTORED
250 31375

View File

@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Tags: no-fasttest
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
# In this test we restore from "/tests/queries/0_stateless/backups/mt_250_parts.zip"
backup_name="$($CURDIR/helpers/install_predefined_backup.sh mt_250_parts.zip)"
${CLICKHOUSE_CLIENT} -nm --query "
DROP TABLE IF EXISTS manyparts;
CREATE TABLE manyparts (x Int64) ENGINE=MergeTree ORDER BY tuple() SETTINGS merge_tree_clear_old_temporary_directories_interval_seconds=1, temporary_directories_lifetime=1;
"
# RESTORE must protect its temporary directories from removing.
${CLICKHOUSE_CLIENT} --query "RESTORE TABLE default.mt_250_parts AS manyparts FROM Disk('backups', '${backup_name}') SETTINGS allow_different_table_def=true" | grep -o "RESTORED"
${CLICKHOUSE_CLIENT} -nm --query "
SELECT count(), sum(x) FROM manyparts;
DROP TABLE manyparts;
"

Binary file not shown.

View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Copies a test predefined backup from "/tests/queries/0_stateless/backups/" folder to the "backups" disk,
# returns the path to the backup relative to that disk.
#
# Usage:
# install_predefined_backup.sh <filename_in_backups_folder>
HELPERS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
src_backup_filename="$1"
src_backup_path="$HELPERS_DIR/../backups/${src_backup_filename}"
backups_disk_root=$($CLICKHOUSE_CLIENT --query "SELECT path FROM system.disks WHERE name='backups'")
if [ -z "${backups_disk_root}" ]; then
echo "Disk 'backups' not found"
exit 1
fi
dest_relative_path=${CLICKHOUSE_DATABASE}/${src_backup_filename}
dest_path=${backups_disk_root}/${dest_relative_path}
mkdir -p "$(dirname "${dest_path}")"
ln -s "${src_backup_path}" "${dest_path}"
echo "${dest_relative_path}"

View File

@ -6,6 +6,7 @@ v24.5.4.49-stable 2024-07-01
v24.5.3.5-stable 2024-06-13
v24.5.2.34-stable 2024-06-13
v24.5.1.1763-stable 2024-06-01
v24.4.4.113-stable 2024-08-02
v24.4.3.25-stable 2024-06-14
v24.4.2.141-stable 2024-06-07
v24.4.1.2088-stable 2024-05-01

1 v24.7.2.13-stable 2024-08-01
6 v24.5.3.5-stable 2024-06-13
7 v24.5.2.34-stable 2024-06-13
8 v24.5.1.1763-stable 2024-06-01
9 v24.4.4.113-stable 2024-08-02
10 v24.4.3.25-stable 2024-06-14
11 v24.4.2.141-stable 2024-06-07
12 v24.4.1.2088-stable 2024-05-01