mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 18:32:29 +00:00
Add assertion
This commit is contained in:
parent
3dc19b4fe2
commit
6a885430d7
@ -92,6 +92,8 @@ std::vector<ThreadGroupStatus::ProfileEventsCountersAndMemory> ThreadGroupStatus
|
||||
ThreadStatus::ThreadStatus()
|
||||
: thread_id{getThreadId()}
|
||||
{
|
||||
chassert(!current_thread);
|
||||
|
||||
last_rusage = std::make_unique<RUsageCounters>();
|
||||
|
||||
memory_tracker.setDescription("(for thread)");
|
||||
@ -145,6 +147,8 @@ ThreadStatus::ThreadStatus()
|
||||
|
||||
ThreadStatus::~ThreadStatus()
|
||||
{
|
||||
chassert(current_thread);
|
||||
|
||||
memory_tracker.adjustWithUntrackedMemory(untracked_memory);
|
||||
|
||||
if (thread_group)
|
||||
|
@ -323,6 +323,7 @@ struct ContextSharedPart
|
||||
{
|
||||
try
|
||||
{
|
||||
LOG_DEBUG(log, "Desctructing threadpool reader");
|
||||
threadpool_reader->wait();
|
||||
threadpool_reader.reset();
|
||||
}
|
||||
@ -336,6 +337,7 @@ struct ContextSharedPart
|
||||
{
|
||||
try
|
||||
{
|
||||
LOG_DEBUG(log, "Desctructing threadpool writer");
|
||||
threadpool_writer->wait();
|
||||
threadpool_writer.reset();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user