We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 24e1bfa + bdea6d6 commit 5850b35Copy full SHA for 5850b35
src/Storages/StorageDistributed.cpp
@@ -838,7 +838,7 @@ std::optional<QueryPipeline> StorageDistributed::distributedWriteBetweenDistribu
838
for (size_t shard_index : collections::range(0, shards_info.size()))
839
{
840
const auto & shard_info = shards_info[shard_index];
841
- if (shard_info.isLocal())
+ if (shard_info.isLocal() && settings.prefer_localhost_replica)
842
843
InterpreterInsertQuery interpreter(new_query, query_context);
844
pipeline.addCompletedPipeline(interpreter.execute().pipeline);
0 commit comments