fix uncaught exception in DatabaseLazy

This commit is contained in:
Alexander Tokmakov 2021-12-03 17:45:53 +03:00
parent adde67358a
commit 90eba0c0f6

View File

@ -269,6 +269,7 @@ StoragePtr DatabaseLazy::loadTable(const String & table_name) const
}
void DatabaseLazy::clearExpiredTables() const
try
{
std::lock_guard lock(mutex);
auto time_now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
@ -303,6 +304,10 @@ void DatabaseLazy::clearExpiredTables() const
cache_expiration_queue.splice(cache_expiration_queue.begin(), busy_tables, busy_tables.begin(), busy_tables.end());
}
catch (...)
{
tryLogCurrentException(log, __PRETTY_FUNCTION__);
}
DatabaseLazyIterator::DatabaseLazyIterator(const DatabaseLazy & database_, Strings && table_names_)