提交 57fccc93 编写于 作者: M Michael Kolupaev

clickhouse: removed a very unlikely race condition on loading Dictionaries [#CONV-6318].

上级 c89bac43
......@@ -69,10 +69,10 @@ private:
{
while (true)
{
reloadImpl();
if (destroy.tryWait(reload_period * 1000))
return;
reloadImpl();
}
}
......@@ -80,9 +80,10 @@ public:
/// Справочники будут обновляться в отдельном потоке, каждые reload_period секунд.
Dictionaries(int reload_period_ = 3600)
: reload_period(reload_period_),
reloading_thread(&Dictionaries::reloadPeriodically, this),
log(&Logger::get("Dictionaries"))
{
reloadImpl();
reloading_thread = boost::thread(&Dictionaries::reloadPeriodically, this);
}
~Dictionaries()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册