mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Randomize parallel_replicas_local_plan
This commit is contained in:
parent
1a8e1eb0fe
commit
04c3661b0b
@ -29,8 +29,6 @@
|
||||
#include <Storages/StorageReplicatedMergeTree.h>
|
||||
#include <Storages/StorageSnapshot.h>
|
||||
#include <Storages/buildQueryTreeForShard.h>
|
||||
#include <Planner/Utils.h>
|
||||
#include <Interpreters/InterpreterSelectQueryAnalyzer.h>
|
||||
#include <Processors/QueryPlan/ParallelReplicasLocalPlan.h>
|
||||
#include <Storages/getStructureOfRemoteTable.h>
|
||||
|
||||
|
@ -998,18 +998,6 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(QueryTreeNodePtr table_expres
|
||||
table_expression_query_info.storage_limits,
|
||||
std::move(reading_step));
|
||||
query_plan = std::move(query_plan_parallel_replicas);
|
||||
|
||||
if (settings.parallel_replicas_local_plan)
|
||||
{
|
||||
const auto old_max_threads = query_plan.getMaxThreads();
|
||||
query_plan.setMaxThreads(old_max_threads * 2);
|
||||
|
||||
LOG_TRACE(
|
||||
getLogger("Planner"),
|
||||
"Increase max threads from {} to {} to have similar number of threads to remote plan",
|
||||
old_max_threads,
|
||||
query_plan.getMaxThreads());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -832,6 +832,7 @@ class SettingsRandomizer:
|
||||
"cross_join_min_bytes_to_compress": lambda: random.choice([0, 1, 100000000]),
|
||||
"min_external_table_block_size_bytes": lambda: random.choice([0, 1, 100000000]),
|
||||
"max_parsing_threads": lambda: random.choice([0, 1, 10]),
|
||||
"parallel_replicas_local_plan": lambda: random.randint(0, 1),
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
|
@ -23,6 +23,7 @@ LIMIT 100;
|
||||
|
||||
SET max_parallel_replicas = 3;
|
||||
SET cluster_for_parallel_replicas = 'test_cluster_one_shard_three_replicas_localhost';
|
||||
SET parallel_replicas_local_plan = 1;
|
||||
SET joined_subquery_requires_alias = 0;
|
||||
|
||||
SELECT '=============== INNER QUERY (NO PARALLEL) ===============';
|
||||
|
@ -17,6 +17,8 @@ INSERT INTO join_inner_table__fuzz_146_replicated
|
||||
SELECT CAST('833c9e22-c245-4eb5-8745-117a9a1f26b1', 'UUID') AS id, CAST(rowNumberInAllBlocks(), 'String') AS key, *
|
||||
FROM generateRandom('number Int64, value1 String, value2 String, time Int64', 1, 10, 2) LIMIT 10;
|
||||
|
||||
SET parallel_replicas_local_plan = 1;
|
||||
|
||||
-- Simple query with analyzer and pure parallel replicas
|
||||
SELECT number
|
||||
FROM join_inner_table__fuzz_146_replicated
|
||||
|
Loading…
Reference in New Issue
Block a user