Skip to content

Commit

Permalink
Merge pull request #598 from Altinity/backports/22.8.21/72190_paralle…
Browse files Browse the repository at this point in the history
…l_distributed_insert_select

22.8 Backport 72190 respect prefer_locahost_replica=0 in parallel_distributed_insert_select to 22.8
  • Loading branch information
Enmk authored Jan 23, 2025
2 parents 24e1bfa + bdea6d6 commit 5850b35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Storages/StorageDistributed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ std::optional<QueryPipeline> StorageDistributed::distributedWriteBetweenDistribu
for (size_t shard_index : collections::range(0, shards_info.size()))
{
const auto & shard_info = shards_info[shard_index];
if (shard_info.isLocal())
if (shard_info.isLocal() && settings.prefer_localhost_replica)
{
InterpreterInsertQuery interpreter(new_query, query_context);
pipeline.addCompletedPipeline(interpreter.execute().pipeline);
Expand Down

0 comments on commit 5850b35

Please sign in to comment.