Skip to content

Commit 5850b35

Browse files
authored
Merge pull request #598 from Altinity/backports/22.8.21/72190_parallel_distributed_insert_select
22.8 Backport 72190 respect prefer_locahost_replica=0 in parallel_distributed_insert_select to 22.8
2 parents 24e1bfa + bdea6d6 commit 5850b35

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)