starrocks
starrocks copied to clipboard
Add one task scheduling queue of solve the problem of can't exit quickly
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.
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!