sleep for 10ms beforen retrying to acquire a lock in DatabaseReplicatedDDLWorker::enqueueQueryImpl

This commit is contained in:
Michael Stetsyuk 2024-09-13 13:41:01 +00:00
parent c9dd409baa
commit 2b6238a5e5

View File

@ -4,6 +4,7 @@
#include <Common/ZooKeeper/KeeperException.h>
#include <Core/ServerUUID.h>
#include <Core/Settings.h>
#include <chrono>
#include <filesystem>
namespace fs = std::filesystem;
@ -249,6 +250,8 @@ String DatabaseReplicatedDDLWorker::enqueueQueryImpl(const ZooKeeperPtr & zookee
}
else if (code != Coordination::Error::ZNODEEXISTS)
zkutil::KeeperMultiException::check(code, ops, res);
std::this_thread::sleep_for(std::chrono::milliseconds(50));
}
if (counter_path.empty())