mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fix distributed send retries on distributed_directory_monitor_{max_,}sleep_time_ms > 5min
In this case error_count can be decreased before checking it for rescheduling send. And actually this can be a problem not only when distributed_directory_monitor_{max_,}sleep_time_ms > 5min, because all threads can be occupated and the real timeout between sends will be > 5min.
This commit is contained in:
parent
14fccf572f
commit
5c89cdbe61
@ -131,9 +131,10 @@ void StorageDistributedDirectoryMonitor::run()
|
||||
{
|
||||
std::unique_lock lock{mutex};
|
||||
|
||||
bool do_sleep = false;
|
||||
while (!quit)
|
||||
{
|
||||
bool do_sleep = true;
|
||||
do_sleep = true;
|
||||
if (!monitor_blocker.isCancelled())
|
||||
{
|
||||
try
|
||||
@ -166,7 +167,7 @@ void StorageDistributedDirectoryMonitor::run()
|
||||
break;
|
||||
}
|
||||
|
||||
if (!quit && error_count)
|
||||
if (!quit && do_sleep)
|
||||
task_handle->scheduleAfter(sleep_time.count());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user