When I queried `system.metrics` table, I found some negative values which hint to some potential internal overflows.

```
SELECT *
FROM system.metrics
FORMAT Vertical

...

Row 31:
───────
metric:      MemoryTrackingInBackgroundProcessingPool
value:       -580863171
description: Total amount of memory (bytes) allocated in background processing pool (that is dedicated for backround merges, mutations and fetches). Note that this value may include a drift when the memory was allocated in a context of background processing pool and freed in other context or vice-versa. This happens naturally due to caches for tables indexes and doesn't indicate memory leaks.

Row 32:
───────
metric:      MemoryTrackingInBackgroundMoveProcessingPool
value:       0
description: Total amount of memory (bytes) allocated in background processing pool (that is dedicated for backround moves). Note that this value may include a drift when the memory was allocated in a context of background processing pool and freed in other context or vice-versa. This happens naturally due to caches for tables indexes and doesn't indicate memory leaks.

Row 33:
───────
metric:      MemoryTrackingInBackgroundSchedulePool
value:       -4461308831
description: Total amount of memory (bytes) allocated in background schedule pool (that is dedicated for bookkeeping tasks of Replicated tables).

...

56 rows in set. Elapsed: 0.003 sec.
```

Server version: 20.8.2.3.
{
    auto lock = getLock();
    if (!shared->ddl_worker)
        throw Exception("DDL background thread is not initialized.", ErrorCodes::LOGICAL_ERROR);
    return *shared->ddl_worker;
}
zkutil::ZooKeeperPtr Context::getZooKeeper() const
{
    std::lock_guard lock(shared->zookeeper_mutex);
    if (!shared->zookeeper)
        shared->zookeeper = std::make_shared<zkutil::ZooKeeper>(getConfigRef(), "zookeeper");
    else if (shared->zookeeper->expired())
        shared->zookeeper = shared->zookeeper->startNewSession();
    return shared->zookeeper;
}
zkutil::ZooKeeperPtr Context::getAuxiliaryZooKeeper(const String & name) const
{
    std::lock_guard lock(shared->auxiliary_zookeepers_mutex);
    auto zookeeper = shared->auxiliary_zookeepers.find(name);
    if (zookeeper == shared->auxiliary_zookeepers.end())
    {
        if (!getConfigRef().has("auxiliary_zookeepers." + name))
            throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unknown auxiliary ZooKeeper name '{}'. If it's required it can be added to the section <auxiliary_zookeepers> in config.xml", name);
        zookeeper->second = std::make_shared<zkutil::ZooKeeper>(getConfigRef(), "auxiliary_zookeepers." + name);
    }
    else if (zookeeper->second->expired())
        zookeeper->second = zookeeper->second->startNewSession();
    return zookeeper->second;
}
void Context::resetZooKeeper() const