starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

Add one task scheduling queue of solve the problem of can't exit quickly

Open trueeyu opened this issue 3 years ago • 1 comments

Enhancement

void* StorageEngine::_fd_cache_clean_callback(void* arg) {
#ifdef GOOGLE_PROFILER
    ProfilerRegisterThread();
#endif
    while (!_bg_worker_stopped.load(std::memory_order_consume)) {
        int32_t interval = config::file_descriptor_cache_clean_interval;
        if (interval <= 0) {
            LOG(WARNING) << "config of file descriptor clean interval is illegal: " << interval << "force set to 3600";
            interval = 3600;
        }
        SLEEP_IN_BG_WORKER(interval);

        _start_clean_fd_cache();
    }

    return nullptr;
}

In some scenarios, if it is difficult to exit gracefully after Sleep, we can create a task scheduling queue to uniformly schedule these Sleep tasks.

trueeyu avatar Mar 23 '22 09:03 trueeyu

We have marked this issue as stale because it has been inactive for 6 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to StarRocks!

github-actions[bot] avatar Sep 19 '22 11:09 github-actions[bot]