Remove obsolete pointer for trace collector in context.

This commit is contained in:
Ivan Lezhankin 2020-01-24 18:40:08 +03:00
parent a982309cff
commit 09b39b78e4
2 changed files with 1 additions and 12 deletions

View File

@ -166,7 +166,6 @@ struct ContextShared
RemoteHostFilter remote_host_filter; /// Allowed URL from config.xml
std::unique_ptr<TraceCollector> trace_collector; /// Thread collecting traces from threads executing queries
/// Named sessions. The user could specify session identifier to reuse settings and temporary tables in subsequent requests.
class SessionKeyHash
@ -302,11 +301,6 @@ struct ContextShared
ext::Singleton<TraceCollector>()->stop();
}
bool hasTraceCollector()
{
return trace_collector != nullptr;
}
void initializeTraceCollector(std::shared_ptr<TraceLog> trace_log)
{
if (trace_log == nullptr)
@ -1701,11 +1695,6 @@ void Context::initializeSystemLogs()
shared->system_logs.emplace(*global_context, getConfigRef());
}
bool Context::hasTraceCollector()
{
return shared->hasTraceCollector();
}
void Context::initializeTraceCollector()
{
shared->initializeTraceCollector(getTraceLog());

View File

@ -155,7 +155,7 @@ void ThreadStatus::finalizePerformanceCounters()
void ThreadStatus::initQueryProfiler()
{
/// query profilers are useless without trace collector
if (!global_context || !global_context->hasTraceCollector())
if (!global_context)
return;
const auto & settings = query_context->getSettingsRef();