mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
Merge pull request #45788 from ClickHouse/insert-keeper-retries-doc
Add settings for keeper retries during INSERT
This commit is contained in:
commit
1f8948675b
@ -1632,6 +1632,49 @@ SELECT * FROM test_table
|
||||
└───┘
|
||||
```
|
||||
|
||||
## insert_keeper_max_retries
|
||||
|
||||
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
|
||||
|
||||
Default value: 0
|
||||
|
||||
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 {#insert_keeper_retry_initial_backoff_ms}
|
||||
|
||||
Initial timeout(in milliseconds) to retry a failed Keeper request during INSERT query execution
|
||||
|
||||
Possible values:
|
||||
|
||||
- Positive integer.
|
||||
- 0 — No timeout
|
||||
|
||||
Default value: 100
|
||||
|
||||
## insert_keeper_retry_max_backoff_ms {#insert_keeper_retry_max_backoff_ms}
|
||||
|
||||
Maximum timeout (in milliseconds) to retry a failed Keeper request during INSERT query execution
|
||||
|
||||
Possible values:
|
||||
|
||||
- Positive integer.
|
||||
- 0 — Maximum timeout is not limited
|
||||
|
||||
Default value: 10000
|
||||
|
||||
## max_network_bytes {#settings-max-network-bytes}
|
||||
|
||||
Limits the data volume (in bytes) that is received or transmitted over the network when executing a query. This setting applies to every individual query.
|
||||
|
Loading…
Reference in New Issue
Block a user