Skip to content

Commit bdea6d6

Browse files
committed
respect prefer_locahost_replica=0 in parallel_distributed_insert_select
1 parent 485dd4f commit bdea6d6

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
@@ -838,7 +838,7 @@ std::optional<QueryPipeline> StorageDistributed::distributedWriteBetweenDistribu
838838
for (size_t shard_index : collections::range(0, shards_info.size()))
839839
{
840840
const auto & shard_info = shards_info[shard_index];
841-
if (shard_info.isLocal())
841+
if (shard_info.isLocal() && settings.prefer_localhost_replica)
842842
{
843843
InterpreterInsertQuery interpreter(new_query, query_context);
844844
pipeline.addCompletedPipeline(interpreter.execute().pipeline);

0 commit comments

Comments
 (0)