mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Make thread_ids unique
This commit is contained in:
parent
53b655bfa9
commit
ec5a32f534
@ -78,7 +78,7 @@ public:
|
||||
InternalProfileEventsQueueWeakPtr profile_queue_ptr;
|
||||
std::function<void()> fatal_error_callback;
|
||||
|
||||
std::vector<UInt64> thread_ids;
|
||||
std::unordered_set<UInt64> thread_ids;
|
||||
std::unordered_set<ThreadStatusPtr> threads;
|
||||
|
||||
/// The first thread created this thread group
|
||||
|
@ -109,7 +109,7 @@ void ThreadStatus::setupState(const ThreadGroupStatusPtr & thread_group_)
|
||||
std::lock_guard lock(thread_group->mutex);
|
||||
|
||||
/// NOTE: thread may be attached multiple times if it is reused from a thread pool.
|
||||
thread_group->thread_ids.emplace_back(thread_id);
|
||||
thread_group->thread_ids.insert(thread_id);
|
||||
thread_group->threads.insert(this);
|
||||
|
||||
logs_queue_ptr = thread_group->logs_queue_ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user