mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #15987 from filimonov/background-pool-count_no_work_done-bug
Fix the bug when NOTHING_TO_DO events wrongly increment count_no_work_done
This commit is contained in:
commit
f366b366ae
@ -217,8 +217,11 @@ void BackgroundProcessingPool::workLoopFunc()
|
||||
|
||||
if (task_result == TaskResult::SUCCESS)
|
||||
task->count_no_work_done = 0;
|
||||
else
|
||||
else if (task_result == TaskResult::ERROR)
|
||||
++task->count_no_work_done;
|
||||
/// NOTHING_TO_DO should not increment count_no_work_done
|
||||
/// otherwise error after period of inactivity (lot of NOTHING_TO_DO)
|
||||
/// leads to 5-10 min replication hang
|
||||
|
||||
/// If task has done work, it could be executed again immediately.
|
||||
/// If not, add delay before next run.
|
||||
|
Loading…
Reference in New Issue
Block a user