From 7c0339bc5e45b591f583dc4862bd85540fee36dc Mon Sep 17 00:00:00 2001 From: Nikita Lapkov Date: Sat, 9 Feb 2019 22:26:51 +0000 Subject: [PATCH] fix unresolved conflicts --- dbms/src/Interpreters/Context.cpp | 24 +++++++++++------------ dbms/src/Interpreters/ThreadStatusExt.cpp | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/dbms/src/Interpreters/Context.cpp b/dbms/src/Interpreters/Context.cpp index 5874eb956fc..5a76964e6ac 100644 --- a/dbms/src/Interpreters/Context.cpp +++ b/dbms/src/Interpreters/Context.cpp @@ -274,7 +274,15 @@ struct ContextShared databases.clear(); } -<<<<<<< HEAD + /// Preemptive destruction is important, because these objects may have a refcount to ContextShared (cyclic reference). + /// TODO: Get rid of this. + + embedded_dictionaries.reset(); + external_dictionaries.reset(); + external_models.reset(); + background_pool.reset(); + schedule_pool.reset(); + /// Close trace pipe - definitely nobody needs to write there after /// databases shutdown trace_pipe.close(); @@ -288,16 +296,6 @@ struct ContextShared trace_pipe.open(); trace_collector.reset(new TraceCollector(trace_log, trace_collector_stop.get_future())); trace_collector_thread.start(*trace_collector); -======= - /// Preemptive destruction is important, because these objects may have a refcount to ContextShared (cyclic reference). - /// TODO: Get rid of this. - - embedded_dictionaries.reset(); - external_dictionaries.reset(); - external_models.reset(); - background_pool.reset(); - schedule_pool.reset(); ->>>>>>> parent/master } private: @@ -1623,10 +1621,10 @@ TraceLog * Context::getTraceLog() { auto lock = getLock(); - if (!system_logs || !system_logs->trace_log) + if (!shared->system_logs || !shared->system_logs->trace_log) return nullptr; - return system_logs->trace_log.get(); + return shared->system_logs->trace_log.get(); } diff --git a/dbms/src/Interpreters/ThreadStatusExt.cpp b/dbms/src/Interpreters/ThreadStatusExt.cpp index c16a4ecc66c..9e41eca7a75 100644 --- a/dbms/src/Interpreters/ThreadStatusExt.cpp +++ b/dbms/src/Interpreters/ThreadStatusExt.cpp @@ -135,7 +135,7 @@ namespace { void queryProfilerTimerHandler(int /* sig */, siginfo_t * /* info */, void * context) { DB::WriteBufferFromFileDescriptor out(trace_pipe.fds_rw[1]); - const std::string & query_id = CurrentThread::getCurrentQueryID(); + const std::string & query_id = CurrentThread::getQueryId(); DB::writePODBinary(*reinterpret_cast(context), out); DB::writeStringBinary(query_id, out);