mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Increment ZooKeeperWatch metric only if the callback is registered
This commit is contained in:
parent
9b01ded17a
commit
9b3ceda57c
@ -566,7 +566,6 @@ void ZooKeeper::sendThread()
|
||||
if (info.watch)
|
||||
{
|
||||
info.request->has_watch = true;
|
||||
CurrentMetrics::add(CurrentMetrics::ZooKeeperWatch);
|
||||
}
|
||||
|
||||
if (expired)
|
||||
@ -773,6 +772,8 @@ void ZooKeeper::receiveEvent()
|
||||
|
||||
if (add_watch)
|
||||
{
|
||||
CurrentMetrics::add(CurrentMetrics::ZooKeeperWatch);
|
||||
|
||||
/// The key of wathces should exclude the root_path
|
||||
String req_path = request_info.request->getPath();
|
||||
removeRootPath(req_path, root_path);
|
||||
|
Loading…
Reference in New Issue
Block a user