mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Added missing code
This commit is contained in:
parent
99667a38c3
commit
8d3e6ed5e3
@ -30,7 +30,8 @@ std::shared_ptr<TSystemLog> createSystemLog(
|
||||
const String & default_database_name,
|
||||
const String & default_table_name,
|
||||
const Poco::Util::AbstractConfiguration & config,
|
||||
const String & config_prefix)
|
||||
const String & config_prefix,
|
||||
bool lazy_load)
|
||||
{
|
||||
if (!config.has(config_prefix))
|
||||
return {};
|
||||
@ -63,7 +64,7 @@ std::shared_ptr<TSystemLog> createSystemLog(
|
||||
|
||||
size_t flush_interval_milliseconds = config.getUInt64(config_prefix + ".flush_interval_milliseconds", DEFAULT_SYSTEM_LOG_FLUSH_INTERVAL_MILLISECONDS);
|
||||
|
||||
return std::make_shared<TSystemLog>(context, database, table, engine, flush_interval_milliseconds);
|
||||
return std::make_shared<TSystemLog>(context, database, table, engine, flush_interval_milliseconds, lazy_load);
|
||||
}
|
||||
|
||||
}
|
||||
@ -71,12 +72,14 @@ std::shared_ptr<TSystemLog> createSystemLog(
|
||||
|
||||
SystemLogs::SystemLogs(Context & global_context, const Poco::Util::AbstractConfiguration & config)
|
||||
{
|
||||
query_log = createSystemLog<QueryLog>(global_context, "system", "query_log", config, "query_log");
|
||||
query_thread_log = createSystemLog<QueryThreadLog>(global_context, "system", "query_thread_log", config, "query_thread_log");
|
||||
part_log = createSystemLog<PartLog>(global_context, "system", "part_log", config, "part_log");
|
||||
trace_log = createSystemLog<TraceLog>(global_context, "system", "trace_log", config, "trace_log");
|
||||
text_log = createSystemLog<TextLog>(global_context, "system", "text_log", config, "text_log");
|
||||
metric_log = createSystemLog<MetricLog>(global_context, "system", "metric_log", config, "metric_log");
|
||||
bool lazy_load = config.getBool("system_tables_lazy_load", true);
|
||||
|
||||
query_log = createSystemLog<QueryLog>(global_context, "system", "query_log", config, "query_log", lazy_load);
|
||||
query_thread_log = createSystemLog<QueryThreadLog>(global_context, "system", "query_thread_log", config, "query_thread_log", lazy_load);
|
||||
part_log = createSystemLog<PartLog>(global_context, "system", "part_log", config, "part_log", lazy_load);
|
||||
trace_log = createSystemLog<TraceLog>(global_context, "system", "trace_log", config, "trace_log", lazy_load);
|
||||
text_log = createSystemLog<TextLog>(global_context, "system", "text_log", config, "text_log", lazy_load);
|
||||
metric_log = createSystemLog<MetricLog>(global_context, "system", "metric_log", config, "metric_log", lazy_load);
|
||||
|
||||
if (metric_log)
|
||||
{
|
||||
|
@ -117,7 +117,8 @@ public:
|
||||
const String & database_name_,
|
||||
const String & table_name_,
|
||||
const String & storage_def_,
|
||||
size_t flush_interval_milliseconds_);
|
||||
size_t flush_interval_milliseconds_,
|
||||
bool lazy_load);
|
||||
|
||||
/** Append a record into log.
|
||||
* Writing to table will be done asynchronously and in case of failure, record could be lost.
|
||||
|
@ -72,9 +72,9 @@ void TextLogElement::appendToBlock(Block & block) const
|
||||
|
||||
TextLog::TextLog(Context & context_, const String & database_name_,
|
||||
const String & table_name_, const String & storage_def_,
|
||||
size_t flush_interval_milliseconds_)
|
||||
size_t flush_interval_milliseconds_, bool lazy_load)
|
||||
: SystemLog<TextLogElement>(context_, database_name_, table_name_,
|
||||
storage_def_, flush_interval_milliseconds_)
|
||||
storage_def_, flush_interval_milliseconds_, lazy_load)
|
||||
{
|
||||
// SystemLog methods may write text logs, so we disable logging for the text
|
||||
// log table to avoid recursion.
|
||||
|
@ -36,7 +36,8 @@ public:
|
||||
const String & database_name_,
|
||||
const String & table_name_,
|
||||
const String & storage_def_,
|
||||
size_t flush_interval_milliseconds_);
|
||||
size_t flush_interval_milliseconds_,
|
||||
bool lazy_load);
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user