提交 87158412 编写于 作者: N Nikita Mikhaylov

atomic backoff_end_time added

上级 b19f76df
......@@ -821,7 +821,7 @@ void CacheDictionary::update(BunchUpdateUnit & bunch_update_unit) const
const auto now = std::chrono::system_clock::now();
if (now > backoff_end_time)
if (now > backoff_end_time.load())
{
try
{
......@@ -902,7 +902,7 @@ void CacheDictionary::update(BunchUpdateUnit & bunch_update_unit) const
backoff_end_time = now + std::chrono::seconds(calculateDurationWithBackoff(rnd_engine, error_count));
tryLogException(last_exception, log, "Could not update cache dictionary '" + getFullName() +
"', next update is scheduled at " + ext::to_string(backoff_end_time));
"', next update is scheduled at " + ext::to_string(backoff_end_time.load()));
}
}
......
......@@ -318,7 +318,7 @@ private:
mutable std::exception_ptr last_exception;
mutable std::atomic<size_t> error_count = 0;
mutable std::chrono::system_clock::time_point backoff_end_time;
mutable std::atomic<std::chrono::system_clock::time_point> backoff_end_time;
mutable pcg64 rnd_engine;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册