mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
finally fix attachProfileCountersScope
This commit is contained in:
parent
0d6c6a94de
commit
78c35ffc45
@ -169,8 +169,10 @@ ProfileEvents::Counters * ThreadStatus::attachProfileCountersScope(ProfileEvents
|
||||
/// Allow to attach the same scope multiple times
|
||||
return prev_counters;
|
||||
|
||||
if (!performance_counters_scope->getParent())
|
||||
/// Avoid cycles when exiting local scope and attaching back to current thread counters
|
||||
if (performance_counters_scope != &performance_counters)
|
||||
performance_counters_scope->setParent(&performance_counters);
|
||||
|
||||
current_performance_counters = performance_counters_scope;
|
||||
|
||||
return prev_counters;
|
||||
|
Loading…
Reference in New Issue
Block a user