mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Don't throw LOGICAL_ERROR when reading from remote if there is no local replica (#49136)
Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
This commit is contained in:
parent
ddfbc61e99
commit
7abb94fe33
@ -331,7 +331,7 @@ void ReadFromParallelRemoteReplicasStep::initializePipeline(QueryPipelineBuilder
|
||||
all_replicas_count = cluster->getShardsInfo().size();
|
||||
}
|
||||
|
||||
/// Find local shard
|
||||
/// Find local shard. It might happen that there is no local shard, but that's fine
|
||||
for (const auto & shard: cluster->getShardsInfo())
|
||||
{
|
||||
if (shard.isLocal())
|
||||
@ -346,9 +346,6 @@ void ReadFromParallelRemoteReplicasStep::initializePipeline(QueryPipelineBuilder
|
||||
}
|
||||
}
|
||||
|
||||
if (pipes.empty())
|
||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "No local shard");
|
||||
|
||||
auto current_shard = cluster->getShardsInfo().begin();
|
||||
while (pipes.size() != all_replicas_count)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user