Skip to content

Commit

Permalink
Avoid busy loop in DDLWorker when ZooKeeper is not available [#CLICKH…
Browse files Browse the repository at this point in the history
…OUSE-4126]
  • Loading branch information
alexey-milovidov committed Nov 10, 2018
1 parent b21aa60 commit 8f50c62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dbms/src/Interpreters/DDLWorker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -882,8 +882,12 @@ void DDLWorker::run()
catch (const Coordination::Exception & e)
{
if (!Coordination::isHardwareError(e.code))
throw;
throw; /// A logical error.

tryLogCurrentException(__PRETTY_FUNCTION__);

/// Avoid busy loop when ZooKeeper is not available.
::sleep(1);
}
}
catch (...)
Expand Down

0 comments on commit 8f50c62

Please sign in to comment.