mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 11:02:08 +00:00
fix another issue
This commit is contained in:
parent
38c80940fd
commit
6e4787560b
@ -212,7 +212,7 @@ void TransactionLog::runUpdatingThread()
|
||||
if (stop_flag.load())
|
||||
return;
|
||||
|
||||
if (!zookeeper)
|
||||
if (getZooKeeper()->expired())
|
||||
{
|
||||
auto new_zookeeper = global_context->getZooKeeper();
|
||||
std::lock_guard lock{mutex};
|
||||
@ -222,16 +222,11 @@ void TransactionLog::runUpdatingThread()
|
||||
loadNewEntries();
|
||||
removeOldEntries();
|
||||
}
|
||||
catch (const Coordination::Exception & e)
|
||||
catch (const Coordination::Exception &)
|
||||
{
|
||||
tryLogCurrentException(log);
|
||||
/// TODO better backoff
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
if (Coordination::isHardwareError(e.code))
|
||||
{
|
||||
std::lock_guard lock{mutex};
|
||||
zookeeper.reset();
|
||||
}
|
||||
log_updated_event->set();
|
||||
}
|
||||
catch (...)
|
||||
|
Loading…
Reference in New Issue
Block a user