And waits for them. That's pointless.
}
    tryRemovePartsFromZooKeeperWithRetries(parts_to_remove_from_zk);
    auto local_active_parts = getDataParts();
    DataPartsVector parts_to_remove_from_working_set;
    for (const auto & part : local_active_parts)
    {
        if (active_parts_set.getContainingPart(part->name).empty())
        {
            parts_to_remove_from_working_set.emplace_back(part);
            LOG_WARNING(log, "Source replica does not have part {}. Removing it from working set.", part->name);
        }
    }
    if (getSettings()->detach_old_local_parts_when_cloning_replica)
    {
        auto metadata_snapshot = getInMemoryMetadataPtr();
        for (const auto & part : parts_to_remove_from_working_set)
        {
            LOG_INFO(log, "Detaching {}", part->relative_path);
            part->makeCloneInDetached("clone", metadata_snapshot);
        }
    }
    removePartsFromWorkingSet(parts_to_remove_from_working_set, true);
    for (const String & name : active_parts)
    {
        LogEntry log_entry;
        if (!are_restoring_replica)
            log_entry.type = LogEntry::GET_PART;
        else
        {
            LOG_DEBUG(log, "Obtaining checksum for path {}", name);