https://clickhouse-test-reports.s3.yandex.net/19868/c39ee3f58c85de0f2a7b609377e2f138305dc745/fuzzer_debug/report.html#fail1
if (shard_info.isLocal() && settings.prefer_localhost_replica)
            writeToLocal(block, shard_info.getLocalNodeCount());
        std::vector<std::string> dir_names;
        for (const auto & address : cluster->getShardsAddresses()[shard_id])
            if (!address.is_local || !settings.prefer_localhost_replica)
                dir_names.push_back(address.toFullString(settings.use_compact_format_in_distributed_parts_names));
        if (!dir_names.empty())
            writeToShard(block, dir_names);
    }
}
void DistributedBlockOutputStream::writeToLocal(const Block & block, const size_t repeats)
{
    
    InterpreterInsertQuery interp(query_ast, context);
    auto block_io = interp.execute();
    block_io.out->writePrefix();
    writeBlockConvert(block_io.out, block, repeats);
    block_io.out->writeSuffix();
}
void DistributedBlockOutputStream::writeToShard(const Block & block, const std::vector<std::string> & dir_names)
{
    const auto & settings = context.getSettingsRef();
    const auto & distributed_settings = storage.getDistributedSettingsRef();
    bool fsync = distributed_settings.fsync_after_insert;
    bool dir_fsync = distributed_settings.fsync_directories;
    std::string compression_method = Poco::toUpper(settings.network_compression_method.toString());
    std::optional<int> compression_level;
    if (compression_method == "ZSTD")
        compression_level = settings.network_zstd_compression_level;
    CompressionCodecFactory::instance().validateCodec(compression_method, compression_level, !settings.allow_suspicious_codecs);