mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 21:12:28 +00:00
Added comments
This commit is contained in:
parent
fac0b2f62d
commit
7d630b6b1b
@ -147,6 +147,9 @@ void SelectStreamFactory::createForShard(
|
|||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// prefer_localhost_replica is not effective in case of parallel replicas
|
||||||
|
// (1) prefer_localhost_replica is about choosing one replica on a shard
|
||||||
|
// (2) parallel replica coordinator has own logic to choose replicas to read from
|
||||||
if (settings.prefer_localhost_replica && shard_info.isLocal() && !parallel_replicas_enabled)
|
if (settings.prefer_localhost_replica && shard_info.isLocal() && !parallel_replicas_enabled)
|
||||||
{
|
{
|
||||||
StoragePtr main_table_storage;
|
StoragePtr main_table_storage;
|
||||||
|
@ -211,6 +211,8 @@ void executeQuery(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// decide for each shard if parallel reading from replicas should be enabled
|
||||||
|
// according to settings and number of replicas declared per shard
|
||||||
bool parallel_replicas_enabled = false;
|
bool parallel_replicas_enabled = false;
|
||||||
if (shard_info.shard_num > 0 && shard_info.shard_num <= cluster->getShardsAddresses().size())
|
if (shard_info.shard_num > 0 && shard_info.shard_num <= cluster->getShardsAddresses().size())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user