Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

shared_merge_* MergeTree table settings

These settings are available in system.merge_tree_settings and are autogenerated from ClickHouse source.

shared_merge_tree_activate_coordinated_merges_tasks

Type
Bool
Default
0
Version history
VersionDefault valueComment
25.90New settings
25.80New settings
25.70New settings
25.60New settings
25.100New settings

Activates rescheduling of coordinated merges tasks. It can be useful even when shared_merge_tree_enable_coordinated_merges=0 because this will populate merge coordinator statistics and help with cold start.

shared_merge_tree_blobs_list_inline_file_max_bytes

Type
UInt64
Default
0
Version history
VersionDefault valueComment
26.90New setting which stores small files of a blob-list part inline in the consolidated blobs.list instead of separate blobs

Store files of a blob-list part that are at most this many bytes long (e.g. count.txt, metadata_version.txt, minmax indexes) directly inside the consolidated blobs.list file instead of a separate object-storage blob, saving one blob write and read per small file. 0 disables inlining. Takes effect only for parts using the blob-list storage (see shared_merge_tree_use_blobs_list_for_parts). Only available in ClickHouse Cloud.

shared_merge_tree_create_per_replica_metadata_nodes

Type
Bool
Default
0
Version history
VersionDefault valueComment
25.110Reduce the amount of metadata in Keeper.
25.11Cloud sync

Enables creation of per-replica /metadata and /columns nodes in ZooKeeper. Only available in ClickHouse Cloud

shared_merge_tree_disable_merges_and_mutations_assignment

Type
Bool
Default
0

Stop merges assignment for shared merge tree. Only available in ClickHouse Cloud

shared_merge_tree_empty_partition_lifetime

Type
Seconds
Default
86400
Version history
VersionDefault valueComment
25.986400New setting

How many seconds partition will be stored in keeper if it has no parts.

shared_merge_tree_enable_automatic_empty_partitions_cleanup

Type
Bool
Default
1
Version history
VersionDefault valueComment
26.21Enable by default
25.90New setting

Enabled cleanup of Keeper entries of empty partition.

shared_merge_tree_enable_coordinated_merges

Type
Bool
Default
1
Version history
VersionDefault valueComment
26.61Enable coordinated merges by default
25.50New setting

Enables coordinated merges strategy

shared_merge_tree_enable_keeper_parts_extra_data

Type
Bool
Default
1
Version history
VersionDefault valueComment
26.61Enable coordinated merges by default
25.30New setting

Enables writing attributes into virtual parts and committing blocks in keeper

shared_merge_tree_enable_outdated_parts_check

Type
Bool
Default
1
Version history
VersionDefault valueComment
25.11Cloud sync

Enable outdated parts check. Only available in ClickHouse Cloud

shared_merge_tree_idle_parts_update_seconds

Type
UInt64
Default
3600
Version history
VersionDefault valueComment
25.13600Cloud sync

Interval in seconds for parts update without being triggered by ZooKeeper watch in the shared merge tree. Only available in ClickHouse Cloud

shared_merge_tree_inactive_replica_cutoff_seconds

Type
Seconds
Default
0
Version history
VersionDefault valueComment
26.60New setting which controls for how long an inactive replica is taken into account by the background cleanup (0 means two ZooKeeper session timeouts)

For how long an inactive replica is still taken into account by the background cleanup (OutdatedPartsQuorumThread): while a replica has been inactive for less than this many seconds, it still holds back removal of outdated parts and truncation of finished mutations. A value of 0 means use the default of two ZooKeeper session timeouts. Only in ClickHouse Cloud

shared_merge_tree_initial_parts_update_backoff_ms

Type
UInt64
Default
50
Version history
VersionDefault valueComment
25.250New setting

Initial backoff for parts update. Only available in ClickHouse Cloud

shared_merge_tree_interserver_http_connection_timeout_ms

Type
UInt64
Default
100
Version history
VersionDefault valueComment
25.2100New setting

Timeouts for interserver HTTP connection. Only available in ClickHouse Cloud

shared_merge_tree_interserver_http_timeout_ms

Type
UInt64
Default
10000
Version history
VersionDefault valueComment
25.110000Cloud sync

Timeouts for interserver HTTP communication. Only available in ClickHouse Cloud

shared_merge_tree_leader_update_period_random_add_seconds

Type
UInt64
Default
10
Version history
VersionDefault valueComment
25.110Cloud sync

Add uniformly distributed value from 0 to x seconds to shared_merge_tree_leader_update_period to avoid thundering herd effect. Only available in ClickHouse Cloud

shared_merge_tree_leader_update_period_seconds

Type
UInt64
Default
30
Version history
VersionDefault valueComment
25.130Cloud sync

Maximum period to recheck leadership for parts update. Only available in ClickHouse Cloud

shared_merge_tree_max_outdated_parts_to_process_at_once

Type
UInt64
Default
1000
Version history
VersionDefault valueComment
25.11000Cloud sync

Maximum amount of outdated parts leader will try to confirm for removal at one HTTP request. Only available in ClickHouse Cloud.

shared_merge_tree_max_parts_update_backoff_ms

Type
UInt64
Default
5000
Version history
VersionDefault valueComment
25.25000New setting

Max backoff for parts update. Only available in ClickHouse Cloud

shared_merge_tree_max_parts_update_leaders_in_total

Type
UInt64
Default
6
Version history
VersionDefault valueComment
25.16Cloud sync

Maximum number of parts update leaders. Only available in ClickHouse Cloud

shared_merge_tree_max_parts_update_leaders_per_az

Type
UInt64
Default
2
Version history
VersionDefault valueComment
25.12Cloud sync

Maximum number of parts update leaders. Only available in ClickHouse Cloud

shared_merge_tree_max_replicas_for_parts_deletion

Type
UInt64
Default
10
Version history
VersionDefault valueComment
25.110Cloud sync

Max replicas which will participate in parts deletion (killer thread). Only available in ClickHouse Cloud

shared_merge_tree_max_replicas_to_merge_parts_for_each_parts_range

Type
UInt64
Default
5
Version history
VersionDefault valueComment
25.15Cloud sync

Max replicas which will try to assign potentially conflicting merges (allow to avoid redundant conflicts in merges assignment). 0 means disabled. Only available in ClickHouse Cloud

shared_merge_tree_max_suspicious_broken_parts

Type
UInt64
Default
0
Version history
VersionDefault valueComment
25.20Max broken parts for SMT, if more - deny automatic detach

Max broken parts for SMT, if more - deny automatic detach.

shared_merge_tree_max_suspicious_broken_parts_bytes

Type
UInt64
Default
0
Version history
VersionDefault valueComment
25.20Max size of all broken parts for SMT, if more - deny automatic detach

Max size of all broken parts for SMT, if more - deny automatic detach.

shared_merge_tree_memo_ids_remove_timeout_seconds

Type
Int64
Default
1800
Version history
VersionDefault valueComment
25.11800Cloud sync

How long we store insert memoization ids to avoid wrong actions during insert retries. Only available in ClickHouse Cloud

shared_merge_tree_merge_coordinator_distribution_algorithm

Type
MergeCoordinatorDistributionAlgorithm
Default
sainte_lague
Version history
VersionDefault valueComment
26.8sainte_lagueEnable Sainte-Lague distribution by default.
26.7water_fillingNew setting which controls what algorithm is used by the merge coordinator to distribute merges between replicas

The algorithm used by the merge coordinator thread to distribute merges between replicas.

Possible values:

  • water_filling
  • sainte_lague

shared_merge_tree_merge_coordinator_election_check_period_ms

Type
Milliseconds
Default
30000
Version history
VersionDefault valueComment
25.530000New setting

Time between runs of merge coordinator election thread

shared_merge_tree_merge_coordinator_factor

Type
Float
Default
1.1
Version history
VersionDefault valueComment
25.51.100000023841858New setting
25.101.100000023841858Lower coordinator sleep time after load

Time changing factor for delay of coordinator thread

shared_merge_tree_merge_coordinator_fetch_fresh_metadata_period_ms

Type
Milliseconds
Default
10000
Version history
VersionDefault valueComment
25.510000New setting

How often merge coordinator should sync with zookeeper to take fresh metadata

shared_merge_tree_merge_coordinator_max_merge_request_size

Type
UInt64
Default
20
Version history
VersionDefault valueComment
25.520New setting

Number of merges that coordinator can request from MergerMutator at once

shared_merge_tree_merge_coordinator_max_period_ms

Type
Milliseconds
Default
10000
Version history
VersionDefault valueComment
25.510000New setting

Maximum time between runs of merge coordinator thread

shared_merge_tree_merge_coordinator_merges_prepare_count

Type
UInt64Auto
Default
auto
Version history
VersionDefault valueComment
26.4autoMake setting auto: max merge tasks per replica * number of active replicas
25.5100New setting

Number of merge entries that coordinator should prepare and distribute across workers. When set to ‘auto’, equals the max number of merge tasks allowed on a single replica multiplied by the number of active replicas.

shared_merge_tree_merge_coordinator_min_period_ms

Type
Milliseconds
Default
1
Version history
VersionDefault valueComment
25.51New setting

Minimum time between runs of merge coordinator thread

shared_merge_tree_merge_worker_fast_timeout_ms

Type
Milliseconds
Default
100
Version history
VersionDefault valueComment
25.5100New setting

Timeout that merge worker thread will use if it is needed to update it’s state after immediate action

shared_merge_tree_merge_worker_regular_timeout_ms

Type
Milliseconds
Default
10000
Version history
VersionDefault valueComment
25.510000New setting

Time between runs of merge worker thread

shared_merge_tree_outdated_parts_group_size

Type
UInt64
Default
2
Version history
VersionDefault valueComment
25.92New setting

How many replicas will be in the same rendezvous hash group for outdated parts cleanup. Only available in ClickHouse Cloud.

shared_merge_tree_partitions_hint_ratio_to_reload_merge_pred_for_mutations

Type
Float
Default
0.5

Will reload merge predicate in merge/mutate selecting task when <candidate partitions for mutations only (partitions that cannot be merged)>/<candidate partitions for mutations> ratio is higher than the setting. Only available in ClickHouse Cloud

shared_merge_tree_parts_load_batch_size

Type
UInt64
Default
32

Amount of fetch parts metadata jobs to schedule at once. Only available in ClickHouse Cloud

shared_merge_tree_postpone_next_merge_for_locally_merged_parts_ms

Type
UInt64
Default
0
Version history
VersionDefault valueComment
25.10Cloud sync

Time to keep a locally merged part without starting a new merge containing this part. Gives other replicas a chance fetch the part and start this merge. Only available in ClickHouse Cloud.

shared_merge_tree_postpone_next_merge_for_locally_merged_parts_rows_threshold

Type
UInt64
Default
1000000
Version history
VersionDefault valueComment
25.11000000Cloud sync

Minimum size of part (in rows) to postpone assigning a next merge just after merging it locally. Only available in ClickHouse Cloud.

shared_merge_tree_range_for_merge_window_size

Type
UInt64
Default
10
Version history
VersionDefault valueComment
25.110Cloud sync

Window size (in block numbers) used to distribute merge assignment across replicas. Parts within the same window are assigned to the same replicas. Only available in ClickHouse Cloud

shared_merge_tree_read_virtual_parts_from_leader

Type
Bool
Default
1
Version history
VersionDefault valueComment
25.11Cloud sync

Read virtual parts from leader when possible. Only available in ClickHouse Cloud

shared_merge_tree_replica_set_max_lifetime_seconds

Type
Seconds
Default
1800
Version history
VersionDefault valueComment
26.41800Increase default replica set background update interval to 30 minutes
26.2300New setting

How often replicas will try to update replica set in background. Next run is jittered uniformly in [0, value] seconds. Exception: value = 0 does not follow that contract; the implementation applies a minimum of 200 ms, so the next run is jittered in [0, 200] ms.

shared_merge_tree_try_fetch_part_in_memory_data_from_replicas

Type
Bool
Default
0
Version history
VersionDefault valueComment
25.10New setting to fetch parts data from other replicas

If enabled all the replicas try to fetch part in memory data (like primary key, partition info and so on) from other replicas where it already exists.

shared_merge_tree_try_fetch_part_in_memory_data_from_replicas_on_startup

Type
Bool
Default
0
Version history
VersionDefault valueComment
26.60New setting which allows SMT download parts data from replicas instead of S3 on startup

If enabled all the replicas try to fetch part in memory data (like primary key, partition info and so on) on startup from other replicas where it already exists.

shared_merge_tree_update_replica_flags_delay_ms

Type
Milliseconds
Default
30000
Version history
VersionDefault valueComment
25.830000New setting

How often replica will try to reload it’s flags according to background schedule.

shared_merge_tree_use_blobs_list_for_parts

Type
Bool
Default
0
Version history
VersionDefault valueComment
26.90New setting which stores a SharedMergeTree part's per-file blob map in one consolidated Keeper node instead of one node per file

Store parts of a SharedMergeTree table (both Wide and Compact) as a single consolidated blob-list metadata node instead of one Keeper node per file. Collapses per-part Keeper metadata from O(files) to a small constant while keeping one object-storage blob per file. Only available in ClickHouse Cloud.

shared_merge_tree_use_metadata_hints_cache

Type
Bool
Default
1
Version history
VersionDefault valueComment
25.11Cloud sync

Enables requesting FS cache hints from in-memory cache on other replicas. Only available in ClickHouse Cloud

shared_merge_tree_use_outdated_parts_compact_format

Type
Bool
Default
1
Version history
VersionDefault valueComment
25.91Enable outdated parts v3 by default
25.10Cloud sync

Use compact format for outdated parts: reduces load to Keeper, improves outdated parts processing. Only available in ClickHouse Cloud

shared_merge_tree_use_too_many_parts_count_from_virtual_parts

Type
Bool
Default
0
Version history
VersionDefault valueComment
25.10Cloud sync

If enabled too many parts counter will rely on shared data in Keeper, not on local replica state. Only available in ClickHouse Cloud

shared_merge_tree_use_zookeeper_connection_pool

Type
Bool
Default
0
Version history
VersionDefault valueComment
26.30New setting

If enabled, SharedMergeTree uses one of server-level pooled ZooKeeper sessions.

shared_merge_tree_virtual_parts_discovery_batch

Type
UInt64
Default
1
Version history
VersionDefault valueComment
25.81New setting

How many partition discoveries should be packed into batch

shared_merge_tree_virtual_parts_partition_atomic_discovery

Type
Bool
Default
1
Version history
VersionDefault valueComment
26.71New setting

Obsolete setting, does nothing.

Navigation