And waits for them. That's pointless.
{
    auto callback = [this]()
    {
        LOG_INFO(log, "Became leader");
        is_leader = true;
        merge_selecting_task->activateAndSchedule();
    };
    try
    {
        leader_election = std::make_shared<zkutil::LeaderElection>(
            getContext()->getSchedulePool(),
            fs::path(zookeeper_path) / "leader_election",
            *current_zookeeper,    
                                   
            callback,
            replica_name);
    }
    catch (...)
    {
        leader_election = nullptr;
        throw;
    }
}
void StorageReplicatedMergeTree::exitLeaderElection()