Merge pull request #54837 from rschu1ze/obsolete-mt-settings

Mark obsolete settings in system.merge_tree_settings as is_obsolete = 1
This commit is contained in:
Robert Schulze 2023-09-26 19:55:05 +02:00 committed by GitHub
commit 6634043a9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 106 additions and 27 deletions

View File

@ -17,7 +17,7 @@ Columns:
- `0` — Current user can change the setting.
- `1` — Current user cant change the setting.
- `type` ([String](../../sql-reference/data-types/string.md)) — Setting type (implementation specific string value).
- `is_obsolete` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) _ Shows whether a setting is obsolete.
- `is_obsolete` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) - Shows whether a setting is obsolete.
**Example**
```sql

View File

@ -14,7 +14,7 @@ Columns:
- `changed` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Shows whether a setting was specified in `config.xml`
- `description` ([String](../../sql-reference/data-types/string.md)) — Short server setting description.
- `type` ([String](../../sql-reference/data-types/string.md)) — Server setting value type.
- `is_obsolete` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) _ Shows whether a setting is obsolete.
- `is_obsolete` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) - Shows whether a setting is obsolete.
**Example**

View File

@ -17,7 +17,7 @@ Columns:
- `0` — Current user can change the setting.
- `1` — Current user cant change the setting.
- `default` ([String](../../sql-reference/data-types/string.md)) — Setting default value.
- `is_obsolete` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) _ Shows whether a setting is obsolete.
- `is_obsolete` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) - Shows whether a setting is obsolete.
**Example**

View File

@ -24,7 +24,7 @@ struct Settings;
* and should not be changed by the user without a reason.
*/
#define LIST_OF_MERGE_TREE_SETTINGS(M, ALIAS) \
#define MERGE_TREE_SETTINGS(M, ALIAS) \
M(UInt64, min_compress_block_size, 0, "When granule is written, compress the data in buffer if the size of pending uncompressed data is larger or equal than the specified threshold. If this setting is not set, the corresponding global setting is used.", 0) \
M(UInt64, max_compress_block_size, 0, "Compress the pending uncompressed data in buffer if its size is larger or equal than the specified threshold. Block of data will be compressed even if the current granule is not finished. If this setting is not set, the corresponding global setting is used.", 0) \
M(UInt64, index_granularity, 8192, "How many rows correspond to one primary key value.", 0) \
@ -168,6 +168,7 @@ struct Settings;
M(Bool, allow_vertical_merges_from_compact_to_wide_parts, true, "Allows vertical merges from compact to wide parts. This settings must have the same value on all replicas", 0) \
M(Bool, enable_the_endpoint_id_with_zookeeper_name_prefix, false, "Enable the endpoint id with zookeeper name prefix for the replicated merge tree table", 0) \
M(UInt64, zero_copy_merge_mutation_min_parts_size_sleep_before_lock, 1ULL * 1024 * 1024 * 1024, "If zero copy replication is enabled sleep random amount of time before trying to lock depending on parts size for merge or mutation", 0) \
M(Bool, allow_floating_point_partition_key, false, "Allow floating point as partition key", 0) \
\
/** Experimental/work in progress feature. Unsafe for production. */ \
M(UInt64, part_moves_between_shards_enable, 0, "Experimental/Incomplete feature to move parts between shards. Does not take into account sharding expressions.", 0) \
@ -184,32 +185,39 @@ struct Settings;
M(String, primary_key_compression_codec, "ZSTD(3)", "Compression encoding used by primary, primary key is small enough and cached, so the default compression is ZSTD(3).", 0) \
M(UInt64, marks_compress_block_size, 65536, "Mark compress block size, the actual size of the block to compress.", 0) \
M(UInt64, primary_key_compress_block_size, 65536, "Primary compress block size, the actual size of the block to compress.", 0) \
\
/** Obsolete settings. Kept for backward compatibility only. */ \
M(UInt64, min_relative_delay_to_yield_leadership, 120, "Obsolete setting, does nothing.", 0) \
M(UInt64, check_delay_period, 60, "Obsolete setting, does nothing.", 0) \
M(Bool, allow_floating_point_partition_key, false, "Allow floating point as partition key", 0) \
M(UInt64, replicated_max_parallel_sends, 0, "Obsolete setting, does nothing.", 0) \
M(UInt64, replicated_max_parallel_sends_for_table, 0, "Obsolete setting, does nothing.", 0) \
M(UInt64, replicated_max_parallel_fetches, 0, "Obsolete setting, does nothing.", 0) \
M(UInt64, replicated_max_parallel_fetches_for_table, 0, "Obsolete setting, does nothing.", 0) \
M(Bool, write_final_mark, true, "Obsolete setting, does nothing.", 0) \
M(UInt64, min_bytes_for_compact_part, 0, "Obsolete setting, does nothing.", 0) \
M(UInt64, min_rows_for_compact_part, 0, "Obsolete setting, does nothing.", 0) \
M(Bool, in_memory_parts_enable_wal, true, "Obsolete setting, does nothing.", 0) \
M(UInt64, write_ahead_log_max_bytes, 1024 * 1024 * 1024, "Obsolete setting, does nothing.", 0) \
M(UInt64, write_ahead_log_bytes_to_fsync, 100ULL * 1024 * 1024, "Obsolete setting, does nothing.", 0) \
M(UInt64, write_ahead_log_interval_ms_to_fsync, 100, "Obsolete setting, does nothing.", 0) \
M(Bool, in_memory_parts_insert_sync, false, "Obsolete setting, does nothing.", 0) \
M(MaxThreads, max_part_loading_threads, 0, "Obsolete setting, does nothing.", 0) \
M(MaxThreads, max_part_removal_threads, 0, "Obsolete setting, does nothing.", 0) \
M(Bool, use_metadata_cache, false, "Obsolete setting, does nothing.", 0) \
#define MAKE_OBSOLETE_MERGE_TREE_SETTING(M, TYPE, NAME, DEFAULT) \
M(TYPE, NAME, DEFAULT, "Obsolete setting, does nothing.", BaseSettingsHelpers::Flags::OBSOLETE)
#define OBSOLETE_MERGE_TREE_SETTINGS(M, ALIAS) \
/** Obsolete settings that do nothing but left for compatibility reasons. */ \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, UInt64, min_relative_delay_to_yield_leadership, 120) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, UInt64, check_delay_period, 60) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, UInt64, replicated_max_parallel_sends, 0) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, UInt64, replicated_max_parallel_sends_for_table, 0) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, UInt64, replicated_max_parallel_fetches, 0) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, UInt64, replicated_max_parallel_fetches_for_table, 0) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, Bool, write_final_mark, true) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, UInt64, min_bytes_for_compact_part, 0) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, UInt64, min_rows_for_compact_part, 0) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, Bool, in_memory_parts_enable_wal, true) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, UInt64, write_ahead_log_max_bytes, 1024 * 1024 * 1024) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, UInt64, write_ahead_log_bytes_to_fsync, 100ULL * 1024 * 1024) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, UInt64, write_ahead_log_interval_ms_to_fsync, 100) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, Bool, in_memory_parts_insert_sync, false) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, MaxThreads, max_part_loading_threads, 0) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, MaxThreads, max_part_removal_threads, 0) \
MAKE_OBSOLETE_MERGE_TREE_SETTING(M, Bool, use_metadata_cache, false) \
/// Settings that should not change after the creation of a table.
/// NOLINTNEXTLINE
#define APPLY_FOR_IMMUTABLE_MERGE_TREE_SETTINGS(M) \
M(index_granularity)
#define LIST_OF_MERGE_TREE_SETTINGS(M, ALIAS) \
MERGE_TREE_SETTINGS(M, ALIAS) \
OBSOLETE_MERGE_TREE_SETTINGS(M, ALIAS)
DECLARE_SETTINGS_TRAITS(MergeTreeSettingsTraits, LIST_OF_MERGE_TREE_SETTINGS)

View File

@ -0,0 +1,63 @@
-- Obsolete server settings
-- Obsolete general settings
allow_experimental_bigint_types
allow_experimental_database_atomic
allow_experimental_geo_types
allow_experimental_map_type
allow_experimental_window_functions
async_insert_cleanup_timeout_ms
async_insert_stale_timeout_ms
async_insert_threads
background_buffer_flush_schedule_pool_size
background_common_pool_size
background_distributed_schedule_pool_size
background_fetches_pool_size
background_merges_mutations_concurrency_ratio
background_message_broker_schedule_pool_size
background_move_pool_size
background_pool_size
background_schedule_pool_size
backup_threads
database_replicated_ddl_output
default_database_engine
drain_timeout
enable_debug_queries
handle_kafka_error_mode
input_format_arrow_import_nested
input_format_orc_import_nested
input_format_parquet_import_nested
max_alter_threads
max_memory_usage_for_all_queries
max_pipeline_depth
max_remote_read_network_bandwidth_for_server
max_remote_write_network_bandwidth_for_server
max_replicated_fetches_network_bandwidth_for_server
max_replicated_sends_network_bandwidth_for_server
merge_tree_clear_old_parts_interval_seconds
merge_tree_clear_old_temporary_directories_interval_seconds
multiple_joins_rewriter_version
odbc_max_field_size
optimize_duplicate_order_by_and_distinct
optimize_fuse_sum_count_avg
partial_merge_join_optimizations
replication_alter_columns_timeout
restore_threads
temporary_live_view_timeout
-- Obsolete merge tree settings
check_delay_period
in_memory_parts_enable_wal
in_memory_parts_insert_sync
max_part_loading_threads
max_part_removal_threads
min_bytes_for_compact_part
min_relative_delay_to_yield_leadership
min_rows_for_compact_part
replicated_max_parallel_fetches
replicated_max_parallel_fetches_for_table
replicated_max_parallel_sends
replicated_max_parallel_sends_for_table
use_metadata_cache
write_ahead_log_bytes_to_fsync
write_ahead_log_interval_ms_to_fsync
write_ahead_log_max_bytes
write_final_mark

View File

@ -0,0 +1,8 @@
SELECT '-- Obsolete server settings';
SELECT name FROM system.server_settings WHERE is_obsolete = 1 ORDER BY name;
SELECT '-- Obsolete general settings';
SELECT name FROM system.settings WHERE is_obsolete = 1 ORDER BY name;
SELECT '-- Obsolete merge tree settings';
SELECT name FROM system.merge_tree_settings WHERE is_obsolete = 1 ORDER BY name;