We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2730d2a commit 1081559Copy full SHA for 1081559
src/Storages/StorageDistributed.cpp
@@ -925,7 +925,7 @@ std::optional<QueryPipeline> StorageDistributed::distributedWriteBetweenDistribu
925
for (size_t shard_index : collections::range(0, shards_info.size()))
926
{
927
const auto & shard_info = shards_info[shard_index];
928
- if (shard_info.isLocal())
+ if (shard_info.isLocal() && settings.prefer_localhost_replica)
929
930
InterpreterInsertQuery interpreter(new_query, query_context);
931
pipeline.addCompletedPipeline(interpreter.execute().pipeline);
0 commit comments