This commit is contained in:
filimonov 2024-11-21 09:22:05 +05:30 committed by GitHub
commit 058676dabe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1030,7 +1030,7 @@ std::optional<QueryPipeline> StorageDistributed::distributedWriteBetweenDistribu
for (size_t shard_index : collections::range(0, shards_info.size())) for (size_t shard_index : collections::range(0, shards_info.size()))
{ {
const auto & shard_info = shards_info[shard_index]; const auto & shard_info = shards_info[shard_index];
if (shard_info.isLocal()) if (shard_info.isLocal() && settings.prefer_localhost_replica)
{ {
InterpreterInsertQuery interpreter( InterpreterInsertQuery interpreter(
new_query, new_query,