https://clickhouse-test-reports.s3.yandex.net/18817/9049599e367bcccd809f45af138452f965b3303a/stress_test_(undefined)/test_run.txt.out.log
: global_context(global_context_)
{
}
TemporaryLiveViewCleaner::~TemporaryLiveViewCleaner()
{
    stopBackgroundThread();
}
void TemporaryLiveViewCleaner::addView(const std::shared_ptr<StorageLiveView> & view)
{
    if (!view->isTemporary() || background_thread_should_exit)
        return;
    auto current_time = std::chrono::system_clock::now();
    auto time_of_next_check = current_time + view->getTimeout();
    std::lock_guard lock{mutex};
    if (background_thread_should_exit)
        return;
    
    bool background_thread_is_running = !views.empty();
    
    StorageAndTimeOfCheck storage_and_time_of_check{view, time_of_next_check};
    views.insert(std::upper_bound(views.begin(), views.end(), storage_and_time_of_check), storage_and_time_of_check);
    if (!background_thread_is_running)
    {
        if (background_thread.joinable())
            background_thread.join();
        background_thread = ThreadFromGlobalPool{&TemporaryLiveViewCleaner::backgroundThreadFunc, this};
    }
    background_thread_wake_up.notify_one();
}
void TemporaryLiveViewCleaner::backgroundThreadFunc()