Add setting parallel_replicas_skip_index_analysis_on_workers

This commit is contained in:
Igor Nikonov 2024-11-20 22:07:57 +00:00
parent fe9f5c51ce
commit 5a95219e89
3 changed files with 7 additions and 1 deletions

View File

@ -5652,6 +5652,9 @@ Parts virtually divided into segments to be distributed between replicas for par
)", BETA) \
DECLARE(Bool, parallel_replicas_local_plan, true, R"(
Build local plan for local replica
)", BETA) \
DECLARE(Bool, parallel_replicas_skip_index_analysis_on_workers, true, R"(
Skip index analysis on workers. Effective only with enabled parallel_replicas_local_plan
)", BETA) \
\
DECLARE(Bool, allow_experimental_analyzer, true, R"(

View File

@ -81,6 +81,7 @@ namespace Setting
extern const SettingsUInt64 parallel_replicas_count;
extern const SettingsParallelReplicasMode parallel_replicas_mode;
extern const SettingsBool parallel_replicas_local_plan;
extern const SettingsBool parallel_replicas_skip_index_analysis_on_workers;
}
namespace MergeTreeSetting
@ -634,7 +635,8 @@ RangesInDataParts MergeTreeDataSelectExecutor::filterPartsByPrimaryKeyAndSkipInd
{
const Settings & settings = context->getSettingsRef();
if (context->canUseParallelReplicasOnFollower() && settings[Setting::parallel_replicas_local_plan])
if (context->canUseParallelReplicasOnFollower() && settings[Setting::parallel_replicas_local_plan]
&& settings[Setting::parallel_replicas_skip_index_analysis_on_workers])
{
RangesInDataParts parts_with_ranges;
parts_with_ranges.reserve(parts.size());

View File

@ -71,6 +71,7 @@ def _get_result_with_parallel_replicas(
"cluster_for_parallel_replicas": f"{cluster_name}",
"parallel_replicas_mark_segment_size": parallel_replicas_mark_segment_size,
"query_id": query_id,
"parallel_replicas_skip_index_analysis_on_workers": True,
},
)