未验证 提交 b341f43e 编写于 作者: B Bingyi Sun 提交者: GitHub

Add default panic handler for ants pool (#24536)

Signed-off-by: Nsunby <bingyi.sun@zilliz.com>
Co-authored-by: Nsunby <bingyi.sun@zilliz.com>
上级 ae357014
......@@ -326,7 +326,7 @@ func (node *QueryNode) Init() error {
cpuNum := runtime.GOMAXPROCS(0)
node.taskPool, err = concurrency.NewPool(cpuNum, ants.WithPreAlloc(true))
node.taskPool, err = concurrency.NewPool(cpuNum, ants.WithPreAlloc(true), ants.WithPanicHandler(func(v any) { panic(v) }))
if err != nil {
log.Error("QueryNode init channel pool failed", zap.Error(err))
initError = err
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册