mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
zkutil: logging an error when watch leak is suspected. [#METR-10202]
This commit is contained in:
parent
2f14b3b025
commit
e320d6c35c
@ -122,6 +122,10 @@ void * ZooKeeper::watchForEvent(EventPtr event)
|
||||
{
|
||||
Poco::ScopedLock<Poco::FastMutex> lock(mutex);
|
||||
watch_store.insert(res);
|
||||
if (watch_store.size() % 10000 == 0)
|
||||
{
|
||||
LOG_ERROR(log, "There are " << watch_store.size() << " active watches. There must be a leak somewhere.");
|
||||
}
|
||||
}
|
||||
return reinterpret_cast<void *>(res);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user