From 58a4c128d4c1d2109f172ff165308f94d7388f1e Mon Sep 17 00:00:00 2001 From: filimonov <1549571+filimonov@users.noreply.github.com> Date: Wed, 20 Nov 2024 21:55:30 +0100 Subject: [PATCH] respect prefer_locahost_replica=0 in parallel_distributed_insert_select --- src/Storages/StorageDistributed.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index 4f5a95ab508..41338c55d20 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -1030,7 +1030,7 @@ std::optional 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,