Addition to prev. revision #4150

This commit is contained in:
Alexey Milovidov 2019-01-25 21:44:30 +03:00
parent 468f8b4cfb
commit 253ac93459
4 changed files with 5 additions and 3 deletions

View File

@ -71,6 +71,9 @@ std::shared_ptr<InternalTextLogsQueue> CurrentThread::getInternalTextLogsQueue()
ThreadGroupStatusPtr CurrentThread::getGroup()
{
if (!current_thread)
return nullptr;
return get().getThreadGroup();
}

View File

@ -35,7 +35,7 @@ void AsynchronousBlockInputStream::next()
{
ready.reset();
pool.schedule([this, thread_group=CurrentThread::getGroup()] ()
pool.schedule([this, thread_group = CurrentThread::getGroup()] ()
{
CurrentMetrics::Increment metric_increment{CurrentMetrics::QueryThread};

View File

@ -195,7 +195,7 @@ void MergingAggregatedMemoryEfficientBlockInputStream::start()
*/
for (size_t i = 0; i < merging_threads; ++i)
pool.schedule([this, thread_group=CurrentThread::getGroup()] () { mergeThread(thread_group); });
pool.schedule([this, thread_group = CurrentThread::getGroup()] () { mergeThread(thread_group); });
}
}

View File

@ -37,7 +37,6 @@ String ThreadStatus::getQueryID()
void CurrentThread::defaultThreadDeleter()
{
ThreadStatus & thread = CurrentThread::get();
LOG_TRACE(thread.log, "Thread " << thread.thread_number << " exited");
thread.detachQuery(true, true);
}