ZooKeeper: thread names [#CLICKHOUSE-2]

This commit is contained in:
Alexey Milovidov 2018-04-05 02:36:58 +03:00
parent ddc4e1e388
commit 5a525605be
2 changed files with 13 additions and 0 deletions

View File

@ -1,6 +1,7 @@
#include <Common/ZooKeeper/ZooKeeperImpl.h>
#include <Common/Exception.h>
#include <Common/ProfileEvents.h>
#include <Common/setThreadName.h>
#include <Common/typeid_cast.h>
#include <IO/WriteHelpers.h>
@ -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;

View File

@ -4,5 +4,13 @@
<host>localhost</host>
<port>2181</port>
</node>
<node>
<host>yandex.ru</host>
<port>2181</port>
</node>
<node>
<host>111.0.1.2</host>
<port>2181</port>
</node>
</zookeeper>
</yandex>