Added a patch from Alexander Burmak

This commit is contained in:
Alexey Milovidov 2020-04-19 22:53:12 +03:00
parent 61d33a8d9a
commit ca6bea3731

View File

@ -189,7 +189,8 @@ SystemLog<LogElement>::SystemLog(Context & context_,
const String & database_name_, const String & database_name_,
const String & table_name_, const String & table_name_,
const String & storage_def_, const String & storage_def_,
size_t flush_interval_milliseconds_) size_t flush_interval_milliseconds_,
bool lazy_load)
: context(context_) : context(context_)
, table_id(database_name_, table_name_) , table_id(database_name_, table_name_)
, storage_def(storage_def_), , storage_def(storage_def_),
@ -198,6 +199,11 @@ SystemLog<LogElement>::SystemLog(Context & context_,
assert(database_name_ == DatabaseCatalog::SYSTEM_DATABASE); assert(database_name_ == DatabaseCatalog::SYSTEM_DATABASE);
log = &Logger::get("SystemLog (" + database_name_ + "." + table_name_ + ")"); log = &Logger::get("SystemLog (" + database_name_ + "." + table_name_ + ")");
if (!lazy_load)
{
prepareTable();
}
saving_thread = ThreadFromGlobalPool([this] { savingThreadFunction(); }); saving_thread = ThreadFromGlobalPool([this] { savingThreadFunction(); });
} }