From 9fb0257bfa924117ec33f9838d07d323e06ca06c Mon Sep 17 00:00:00 2001 From: congqixia Date: Thu, 22 May 2025 19:06:27 +0800 Subject: [PATCH] enhance: Set thread name for segcore thread pool (#42017) Thread name could be helpful when debugging thread explosion issues Signed-off-by: Congqi Xia --- internal/core/src/storage/ThreadPool.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/core/src/storage/ThreadPool.cpp b/internal/core/src/storage/ThreadPool.cpp index b73acdac35..9e175b04d5 100644 --- a/internal/core/src/storage/ThreadPool.cpp +++ b/internal/core/src/storage/ThreadPool.cpp @@ -15,6 +15,7 @@ // limitations under the License. #include "ThreadPool.h" +#include "log/Log.h" namespace milvus { @@ -65,6 +66,7 @@ void ThreadPool::Worker() { std::function func; bool dequeue; + SetThreadName(name_); while (!shutdown_) { std::unique_lock lock(mutex_); idle_threads_size_++;