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->uncompressed_cache)
        shared->uncompressed_cache->reset();
    if (shared->mark_cache)
        shared->mark_cache->reset();
}
BackgroundProcessingPool & Context::getBackgroundPool()
{
    auto lock = getLock();
    if (!shared->background_pool)
    {
        BackgroundProcessingPool::PoolSettings pool_settings;
        const auto & config = getConfigRef();
        pool_settings.thread_sleep_seconds = config.getDouble("background_processing_pool_thread_sleep_seconds", 10);
        pool_settings.thread_sleep_seconds_random_part = config.getDouble("background_processing_pool_thread_sleep_seconds_random_part", 1.0);
        pool_settings.thread_sleep_seconds_if_nothing_to_do = config.getDouble("background_processing_pool_thread_sleep_seconds_if_nothing_to_do", 0.1);
        pool_settings.task_sleep_seconds_when_no_work_min = config.getDouble("background_processing_pool_task_sleep_seconds_when_no_work_min", 10);
        pool_settings.task_sleep_seconds_when_no_work_max = config.getDouble("background_processing_pool_task_sleep_seconds_when_no_work_max", 600);
        pool_settings.task_sleep_seconds_when_no_work_multiplier = config.getDouble("background_processing_pool_task_sleep_seconds_when_no_work_multiplier", 1.1);
        pool_settings.task_sleep_seconds_when_no_work_random_part = config.getDouble("background_processing_pool_task_sleep_seconds_when_no_work_random_part", 1.0);
        shared->background_pool.emplace(settings.background_pool_size, pool_settings);
    }
    return *shared->background_pool;
}
BackgroundProcessingPool & Context::getBackgroundMovePool()