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.
}
                }
                if (task)
                {
                    Poco::Timestamp current_time;
                    if (scheduled_task_start_time <= current_time)
                        continue;
                    wake_event.wait_for(lock,
                        std::chrono::microseconds(scheduled_task_start_time - current_time
                            + std::uniform_int_distribution<uint64_t>(0, settings.thread_sleep_seconds_random_part * 1000000)(rng)));
                }
                else
                {
                    wake_event.wait_for(lock,
                        std::chrono::duration<double>(settings.thread_sleep_seconds
                            + std::uniform_real_distribution<double>(0, settings.thread_sleep_seconds_random_part)(rng)));
                }
            }
            if (shutdown)
                break;
        }
        std::shared_lock rlock(task->rwlock);
        if (task->removed)
            continue;
        try
        {
            CurrentMetrics::Increment metric_increment{settings.tasks_metric};
            task_result = task->task_function();
        }
        catch (...)