These settings are available in system.settings and are autogenerated from source.
insert_quorum
Enables the quorum writes.
- If
insert_quorum < 2, the quorum writes are disabled. - If
insert_quorum >= 2, the quorum writes are enabled. - If
insert_quorum = 'auto', use majority number (number_of_replicas / 2 + 1) as quorum number.
Quorum writes
INSERT succeeds only when ClickHouse manages to correctly write data to the insert_quorum of replicas during the insert_quorum_timeout. If for any reason the number of replicas with successful writes does not reach the insert_quorum, the write is considered failed and ClickHouse will delete the inserted block from all the replicas where data has already been written.
When insert_quorum_parallel is disabled, all replicas in the quorum are consistent, i.e. they contain data from all previous INSERT queries (the INSERT sequence is linearized). When reading data written using insert_quorum and insert_quorum_parallel is disabled, you can turn on sequential consistency for SELECT queries using select_sequential_consistency.
ClickHouse generates an exception:
- If the number of available replicas at the time of the query is less than the
insert_quorum. - When
insert_quorum_parallelis disabled and an attempt to write data is made when the previous block has not yet been inserted ininsert_quorumof replicas. This situation may occur if the user tries to perform anotherINSERTquery to the same table before the previous one withinsert_quorumis completed.
See also:
insert_quorum_parallel
Version history
| Version | Default value | Comment |
|---|---|---|
| 21.1 | 1 | Use parallel quorum inserts by default. It is significantly more convenient to use than sequential quorum inserts |
Enables or disables parallelism for quorum INSERT queries. If enabled, additional INSERT queries can be sent while previous queries have not yet finished. If disabled, additional writes to the same table will be rejected.
Possible values:
- 0 — Disabled.
- 1 — Enabled.
See also:
insert_quorum_timeout
Write to a quorum timeout in milliseconds. If the timeout has passed and no write has taken place yet, ClickHouse will generate an exception and the client must repeat the query to write the same block to the same or any other replica.
See also: