@@ -137,7 +137,7 @@ void DatabaseCatalog::shutdown()
137
137
138
138
DatabaseAndTable DatabaseCatalog::tryGetByUUID (const UUID & uuid) const
139
139
{
140
- assert (uuid != UUIDHelpers::Nil && 0 <= getFirstLevelIdx (uuid) && getFirstLevelIdx (uuid) < uuid_map.size ());
140
+ assert (uuid != UUIDHelpers::Nil && getFirstLevelIdx (uuid) < uuid_map.size ());
141
141
const UUIDToStorageMapPart & map_part = uuid_map[getFirstLevelIdx (uuid)];
142
142
std::lock_guard lock{map_part.mutex };
143
143
auto it = map_part.map .find (uuid);
@@ -330,7 +330,7 @@ DatabasePtr DatabaseCatalog::getSystemDatabase() const
330
330
331
331
void DatabaseCatalog::addUUIDMapping (const UUID & uuid, DatabasePtr database, StoragePtr table)
332
332
{
333
- assert (uuid != UUIDHelpers::Nil && 0 <= getFirstLevelIdx (uuid) && getFirstLevelIdx (uuid) < uuid_map.size ());
333
+ assert (uuid != UUIDHelpers::Nil && getFirstLevelIdx (uuid) < uuid_map.size ());
334
334
UUIDToStorageMapPart & map_part = uuid_map[getFirstLevelIdx (uuid)];
335
335
std::lock_guard lock{map_part.mutex };
336
336
auto [_, inserted] = map_part.map .try_emplace (uuid, std::move (database), std::move (table));
@@ -340,7 +340,7 @@ void DatabaseCatalog::addUUIDMapping(const UUID & uuid, DatabasePtr database, St
340
340
341
341
void DatabaseCatalog::removeUUIDMapping (const UUID & uuid)
342
342
{
343
- assert (uuid != UUIDHelpers::Nil && 0 <= getFirstLevelIdx (uuid) && getFirstLevelIdx (uuid) < uuid_map.size ());
343
+ assert (uuid != UUIDHelpers::Nil && getFirstLevelIdx (uuid) < uuid_map.size ());
344
344
UUIDToStorageMapPart & map_part = uuid_map[getFirstLevelIdx (uuid)];
345
345
std::lock_guard lock{map_part.mutex };
346
346
if (!map_part.map .erase (uuid))
0 commit comments