From 5a525605bedb9015e5c22cbc749ce44e99a677e9 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Thu, 5 Apr 2018 02:36:58 +0300 Subject: [PATCH] ZooKeeper: thread names [#CLICKHOUSE-2] --- dbms/src/Common/ZooKeeper/ZooKeeperImpl.cpp | 5 +++++ dbms/src/Server/config.d/zookeeper.xml | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/dbms/src/Common/ZooKeeper/ZooKeeperImpl.cpp b/dbms/src/Common/ZooKeeper/ZooKeeperImpl.cpp index 6e1b4016d93..54096511bca 100644 --- a/dbms/src/Common/ZooKeeper/ZooKeeperImpl.cpp +++ b/dbms/src/Common/ZooKeeper/ZooKeeperImpl.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -689,6 +690,8 @@ void ZooKeeper::sendAuth(const String & scheme, const String & data) void ZooKeeper::sendThread() { + setThreadName("ZooKeeperSend"); + auto prev_heartbeat_time = clock::now(); try @@ -744,6 +747,8 @@ void ZooKeeper::sendThread() void ZooKeeper::receiveThread() { + setThreadName("ZooKeeperRecv"); + try { Int64 waited = 0; diff --git a/dbms/src/Server/config.d/zookeeper.xml b/dbms/src/Server/config.d/zookeeper.xml index d390a935107..095f4be78c1 100644 --- a/dbms/src/Server/config.d/zookeeper.xml +++ b/dbms/src/Server/config.d/zookeeper.xml @@ -4,5 +4,13 @@ localhost 2181 + + yandex.ru + 2181 + + + 111.0.1.2 + 2181 +