mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
clickhouse: removed a very unlikely race condition on loading Dictionaries [#CONV-6318].
This commit is contained in:
parent
c89bac439a
commit
57fccc9387
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user