fixed async insertion into local shard of distributed [#CLICKHOUSE-3245]

This commit is contained in:
Nikolai Kochetov 2017-08-23 13:23:16 +03:00 committed by Alex Zatelepin
parent 61289c5c61
commit c43a13cb81

View File

@ -367,6 +367,7 @@ void DistributedBlockOutputStream::writeAsyncImpl(const Block & block, const siz
for (const auto & address : cluster->getShardsAddresses()[shard_id])
if (!address.is_local)
dir_names.push_back(address.toStringFull());
if (!dir_names.empty())
writeToShard(block, dir_names);
}
}