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.
return storage_id;
    }
    bool look_for_external_table = where & StorageNamespace::ResolveExternal;
    bool in_current_database = where & StorageNamespace::ResolveCurrentDatabase;
    bool in_specified_database = where & StorageNamespace::ResolveGlobal;
    if (!storage_id.database_name.empty())
    {
        if (in_specified_database)
            return storage_id;     
        if (exception)
            exception->emplace("External and temporary tables have no database, but " +
                        storage_id.database_name + " is specified", ErrorCodes::UNKNOWN_TABLE);
        return StorageID::createEmpty();
    }
    
    if (look_for_external_table)
    {
        
        assert(global_context != this || getApplicationType() == ApplicationType::LOCAL);
        auto resolved_id = StorageID::createEmpty();
        auto try_resolve = [&](const Context & context) -> bool
        {
            const auto & tables = context.external_tables_mapping;
            auto it = tables.find(storage_id.getTableName());
            if (it == tables.end())
                return false;
            resolved_id = it->second->getGlobalTableID();
            return true;
        };