Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

insert_keeper_* session settings

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

insert_keeper_fault_injection_probability

Type
Float
Default
0

Approximate probability of failure for a keeper request during insert. Valid value is in interval [0.0f, 1.0f]

insert_keeper_fault_injection_seed

Type
UInt64
Default
0

0 - random seed, otherwise the setting value

insert_keeper_max_retries

Type
UInt64
Default
20
Version history
VersionDefault valueComment
23.220Enable reconnections to Keeper on INSERT, improve reliability

The setting sets the maximum number of retries for ClickHouse Keeper (or ZooKeeper) requests during insert into replicated MergeTree. Only Keeper requests which failed due to network error, Keeper session timeout, or request timeout are considered for retries.

Possible values:

  • Positive integer.
  • 0 — Retries are disabled

Keeper request retries are done after some timeout. The timeout is controlled by the following settings: insert_keeper_retry_initial_backoff_ms, insert_keeper_retry_max_backoff_ms. The first retry is done after insert_keeper_retry_initial_backoff_ms timeout. The consequent timeouts will be calculated as follows:

timeout = min(insert_keeper_retry_max_backoff_ms, latest_timeout * 2)

For example, if insert_keeper_retry_initial_backoff_ms=100, insert_keeper_retry_max_backoff_ms=10000 and insert_keeper_max_retries=8 then timeouts will be 100, 200, 400, 800, 1600, 3200, 6400, 10000.

Apart from fault tolerance, the retries aim to provide a better user experience - they allow to avoid returning an error during INSERT execution if Keeper is restarted, for example, due to an upgrade.

insert_keeper_retry_initial_backoff_ms

Type
UInt64
Default
100

Initial timeout(in milliseconds) to retry a failed Keeper request during INSERT query execution

Possible values:

  • Positive integer.
  • 0 — No timeout

insert_keeper_retry_max_backoff_ms

Type
UInt64
Default
10000

Maximum timeout (in milliseconds) to retry a failed Keeper request during INSERT query execution

Possible values:

  • Positive integer.
  • 0 — Maximum timeout is not limited
Navigation