Skip to content

Commit 1081559

Browse files
nickitatEnmk
authored andcommitted
Merge pull request ClickHouse#72190 from filimonov/patch-12
Respect `prefer_locahost_replica` in `parallel_distributed_insert_select`
1 parent 2730d2a commit 1081559

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Storages/StorageDistributed.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ std::optional<QueryPipeline> StorageDistributed::distributedWriteBetweenDistribu
925925
for (size_t shard_index : collections::range(0, shards_info.size()))
926926
{
927927
const auto & shard_info = shards_info[shard_index];
928-
if (shard_info.isLocal())
928+
if (shard_info.isLocal() && settings.prefer_localhost_replica)
929929
{
930930
InterpreterInsertQuery interpreter(new_query, query_context);
931931
pipeline.addCompletedPipeline(interpreter.execute().pipeline);

0 commit comments

Comments
 (0)