Update DatabaseReplicatedWorker.cpp

This commit is contained in:
Alexander Tokmakov 2023-06-29 17:40:10 +03:00 committed by GitHub
parent ef55e4e94d
commit 43fc1af1b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,7 +158,7 @@ bool DatabaseReplicatedDDLWorker::waitForReplicaToProcessAllEntries(UInt64 timeo
LOG_TRACE(log, "Waiting for worker thread to process all entries before {}, current task is {}", max_log, current_task);
bool processed = wait_current_task_change.wait_for(lock, std::chrono::milliseconds(timeout_ms), [&]()
{
return zookeeper->expired() || current_task == max_log || stop_flag;
return zookeeper->expired() || current_task >= max_log || stop_flag;
});
if (!processed)