Merge pull request #49527 from ClickHouse/thread-detach-fix

Fix thread MemoryTracker parent after detach
This commit is contained in:
Sema Checherinda 2023-05-06 19:11:55 +02:00 committed by GitHub
commit 2104baabce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,7 +223,8 @@ void ThreadStatus::detachFromGroup()
performance_counters.setParent(&ProfileEvents::global_counters);
memory_tracker.reset();
memory_tracker.setParent(thread_group->memory_tracker.getParent());
/// Extract MemoryTracker out from query and user context
memory_tracker.setParent(&total_memory_tracker);
thread_group.reset();