v.23.5Experimental Feature

Parallel Replicas: Error Fixes and New Configuration Options

Parallel Replicas: 1) Fixed an error NOT_FOUND_COLUMN_IN_BLOCK in case of using parallel replicas with non-replicated storage with disabled setting parallel_replicas_for_non_replicated_merge_tree 2) Now allow_experimental_parallel_reading_from_replicas have 3 possible values - 0, 1 and 2. 0 - disabled, 1 - enabled, silently disable them in case of failure (in case of FINAL or JOIN), 2 - enabled, throw an exception in case of failure. 3) If FINAL modifier is used in SELECT query and parallel replicas are enabled, ClickHouse will try to disable them if allow_experimental_parallel_reading_from_replicas is set to 1 and throw an exception otherwise. #50195 (Nikita Mikhaylov).
Parallel Replicas Enhancements: Improved handling and flexibility for parallel replicas in ClickHouse, including error fixes and expanded settings control.

Why it matters

This feature fixes the NOT_FOUND_COLUMN_IN_BLOCK error that occurred when using parallel replicas with non-replicated storage and disabled parallel_replicas_for_non_replicated_merge_tree. It also refines the behavior of the allow_experimental_parallel_reading_from_replicas setting by expanding it to three states to better control failure handling, especially in queries using the FINAL modifier or JOIN. These improvements increase stability and predictability when using parallel replicas, enhancing the user experience and reliability.

How to use it

Users can control parallel replicas behavior via the extended setting allow_experimental_parallel_reading_from_replicas with three options:

- 0: Disabled
- 1: Enabled, but silently disable parallel replicas on failure (e.g., with FINAL or JOIN)
- 2: Enabled, but throw an exception on failure

When using FINAL in SELECT queries with parallel replicas enabled, ClickHouse will now conditionally disable or error based on this setting.

Also, ensure that for non-replicated MergeTree tables, either enable parallel_replicas_for_non_replicated_merge_tree or rely on these fixes to avoid errors.