insert_quorum
This setting is not applicable to SharedMergeTree, see SharedMergeTree consistency for more information.
- 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.
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.
insert_quorum_parallel
This setting is not applicable to SharedMergeTree, see SharedMergeTree consistency for more information.
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.