mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Merge pull request #54315 from ClickHouse/add-logs-parallel-replica-over-distributed
Add logs for parallel replica over distributed
This commit is contained in:
commit
54c5158291
@ -245,6 +245,8 @@ void ReadFromRemote::addPipe(Pipes & pipes, const ClusterProxy::SelectStreamFact
|
|||||||
LOG_INFO(log, "cluster_for_parallel_replicas has been set for the query but has no effect: {}. Distributed table cluster is used: {}",
|
LOG_INFO(log, "cluster_for_parallel_replicas has been set for the query but has no effect: {}. Distributed table cluster is used: {}",
|
||||||
cluster_for_parallel_replicas, cluster_name);
|
cluster_for_parallel_replicas, cluster_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG_TRACE(&Poco::Logger::get("ReadFromRemote"), "Setting `cluster_for_parallel_replicas` to {}", cluster_name);
|
||||||
context->setSetting("cluster_for_parallel_replicas", cluster_name);
|
context->setSetting("cluster_for_parallel_replicas", cluster_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ private:
|
|||||||
std::shared_ptr<const StorageLimitsList> storage_limits;
|
std::shared_ptr<const StorageLimitsList> storage_limits;
|
||||||
Poco::Logger * log;
|
Poco::Logger * log;
|
||||||
UInt32 shard_count;
|
UInt32 shard_count;
|
||||||
String cluster_name;
|
const String cluster_name;
|
||||||
|
|
||||||
void addLazyPipe(Pipes & pipes, const ClusterProxy::SelectStreamFactory::Shard & shard);
|
void addLazyPipe(Pipes & pipes, const ClusterProxy::SelectStreamFactory::Shard & shard);
|
||||||
void addPipe(Pipes & pipes, const ClusterProxy::SelectStreamFactory::Shard & shard);
|
void addPipe(Pipes & pipes, const ClusterProxy::SelectStreamFactory::Shard & shard);
|
||||||
|
@ -14,13 +14,13 @@ insert into test select *, today() from numbers(100);
|
|||||||
|
|
||||||
SELECT count(), min(id), max(id), avg(id)
|
SELECT count(), min(id), max(id), avg(id)
|
||||||
FROM test_d
|
FROM test_d
|
||||||
SETTINGS allow_experimental_parallel_reading_from_replicas = 1, max_parallel_replicas = 3, prefer_localhost_replica = 0, parallel_replicas_for_non_replicated_merge_tree=1, use_hedged_requests=0;
|
SETTINGS allow_experimental_parallel_reading_from_replicas = 2, max_parallel_replicas = 3, prefer_localhost_replica = 0, parallel_replicas_for_non_replicated_merge_tree=1, use_hedged_requests=0;
|
||||||
|
|
||||||
insert into test select *, today() from numbers(100);
|
insert into test select *, today() from numbers(100);
|
||||||
|
|
||||||
SELECT count(), min(id), max(id), avg(id)
|
SELECT count(), min(id), max(id), avg(id)
|
||||||
FROM test_d
|
FROM test_d
|
||||||
SETTINGS allow_experimental_parallel_reading_from_replicas = 1, max_parallel_replicas = 3, prefer_localhost_replica = 0, parallel_replicas_for_non_replicated_merge_tree=1, use_hedged_requests=0;
|
SETTINGS allow_experimental_parallel_reading_from_replicas = 2, max_parallel_replicas = 3, prefer_localhost_replica = 0, parallel_replicas_for_non_replicated_merge_tree=1, use_hedged_requests=0;
|
||||||
|
|
||||||
-- 2 shards
|
-- 2 shards
|
||||||
|
|
||||||
@ -38,10 +38,10 @@ insert into test2 select *, today() from numbers(100);
|
|||||||
|
|
||||||
SELECT count(), min(id), max(id), avg(id)
|
SELECT count(), min(id), max(id), avg(id)
|
||||||
FROM test2_d
|
FROM test2_d
|
||||||
SETTINGS allow_experimental_parallel_reading_from_replicas = 1, max_parallel_replicas = 3, prefer_localhost_replica = 0, parallel_replicas_for_non_replicated_merge_tree=1, use_hedged_requests=0;
|
SETTINGS allow_experimental_parallel_reading_from_replicas = 2, max_parallel_replicas = 3, prefer_localhost_replica = 0, parallel_replicas_for_non_replicated_merge_tree=1, use_hedged_requests=0;
|
||||||
|
|
||||||
insert into test2 select *, today() from numbers(100);
|
insert into test2 select *, today() from numbers(100);
|
||||||
|
|
||||||
SELECT count(), min(id), max(id), avg(id)
|
SELECT count(), min(id), max(id), avg(id)
|
||||||
FROM test2_d
|
FROM test2_d
|
||||||
SETTINGS allow_experimental_parallel_reading_from_replicas = 1, max_parallel_replicas = 3, prefer_localhost_replica = 0, parallel_replicas_for_non_replicated_merge_tree=1, use_hedged_requests=0;
|
SETTINGS allow_experimental_parallel_reading_from_replicas = 2, max_parallel_replicas = 3, prefer_localhost_replica = 0, parallel_replicas_for_non_replicated_merge_tree=1, use_hedged_requests=0;
|
||||||
|
Loading…
Reference in New Issue
Block a user