From eb04f0ea8412c7e06c643f5798f0ad4d4964f310 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 27 Dec 2019 22:30:13 +0300 Subject: [PATCH] Removed trash from DDLWorker --- dbms/src/Interpreters/DDLWorker.cpp | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/dbms/src/Interpreters/DDLWorker.cpp b/dbms/src/Interpreters/DDLWorker.cpp index 861a6b5ff03..3077290e3fe 100644 --- a/dbms/src/Interpreters/DDLWorker.cpp +++ b/dbms/src/Interpreters/DDLWorker.cpp @@ -941,22 +941,19 @@ void DDLWorker::runMainThread() { try { - try - { - auto zookeeper = getAndSetZooKeeper(); - zookeeper->createAncestors(queue_dir + "/"); - initialized = true; - } - catch (const Coordination::Exception & e) - { - if (!Coordination::isHardwareError(e.code)) - throw; /// A logical error. + auto zookeeper = getAndSetZooKeeper(); + zookeeper->createAncestors(queue_dir + "/"); + initialized = true; + } + catch (const Coordination::Exception & e) + { + if (!Coordination::isHardwareError(e.code)) + throw; /// A logical error. - tryLogCurrentException(__PRETTY_FUNCTION__); + tryLogCurrentException(__PRETTY_FUNCTION__); - /// Avoid busy loop when ZooKeeper is not available. - sleepForSeconds(1); - } + /// Avoid busy loop when ZooKeeper is not available. + sleepForSeconds(1); } catch (...) {