From f93181bd0b26f372be9f5a4af717ae1ac5f68019 Mon Sep 17 00:00:00 2001 From: lirui238 <2396601465@qq.com> Date: Thu, 5 Jun 2025 16:33:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E3=80=91[taskd]=20bug=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/taskd/taskd/go/common/utils/utils.go | 2 +- component/taskd/taskd/go/framework_backend/manager/manager.go | 2 +- .../go/framework_backend/manager/plugins/faultdig/profiling.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/component/taskd/taskd/go/common/utils/utils.go b/component/taskd/taskd/go/common/utils/utils.go index 2ecd06746..f658ef7ce 100644 --- a/component/taskd/taskd/go/common/utils/utils.go +++ b/component/taskd/taskd/go/common/utils/utils.go @@ -256,5 +256,5 @@ func GetClusterdAddr() (string, error) { return "", fmt.Errorf("%s is NOT a valid IP address", ipFromEnv) } - return string(parsedIP) + constant.ClusterdPort, nil + return ipFromEnv + constant.ClusterdPort, nil } diff --git a/component/taskd/taskd/go/framework_backend/manager/manager.go b/component/taskd/taskd/go/framework_backend/manager/manager.go index 419ea8461..4579ea240 100644 --- a/component/taskd/taskd/go/framework_backend/manager/manager.go +++ b/component/taskd/taskd/go/framework_backend/manager/manager.go @@ -155,7 +155,7 @@ func (m *BaseManager) registerClusterD(retryTime time.Duration) { } conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { - hwlog.RunLog.Error("init clusterd connect failed") + hwlog.RunLog.Errorf("init clusterd connect err: %v", err) m.registerClusterD(retryTime + 1) return } diff --git a/component/taskd/taskd/go/framework_backend/manager/plugins/faultdig/profiling.go b/component/taskd/taskd/go/framework_backend/manager/plugins/faultdig/profiling.go index 1f872b2b4..7db51c1c1 100644 --- a/component/taskd/taskd/go/framework_backend/manager/plugins/faultdig/profiling.go +++ b/component/taskd/taskd/go/framework_backend/manager/plugins/faultdig/profiling.go @@ -261,7 +261,7 @@ func (p *PfPlugin) changeCmd(cmd constant.ProfilingDomainCmd) { } func (p *PfPlugin) getAllWorkerName() []string { - names := make([]string, len(p.workerStatus.workers)) + names := make([]string, 0, len(p.workerStatus.workers)) for name := range p.workerStatus.workers { names = append(names, name) } -- Gitee From 039c0603e8a6feff7fe4f870c9111e6297c99c99 Mon Sep 17 00:00:00 2001 From: lirui238 <2396601465@qq.com> Date: Thu, 5 Jun 2025 17:02:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E3=80=91[taskd]=20bug=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework_backend/manager/plugins/faultdig/profiling.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/component/taskd/taskd/go/framework_backend/manager/plugins/faultdig/profiling.go b/component/taskd/taskd/go/framework_backend/manager/plugins/faultdig/profiling.go index 7db51c1c1..50291d77d 100644 --- a/component/taskd/taskd/go/framework_backend/manager/plugins/faultdig/profiling.go +++ b/component/taskd/taskd/go/framework_backend/manager/plugins/faultdig/profiling.go @@ -225,7 +225,9 @@ func (p *PfPlugin) handleNewCmd() { // PullMsg return Msg func (p *PfPlugin) PullMsg() ([]infrastructure.Msg, error) { hwlog.RunLog.Infof("Profiling PullMsg: %s", utils.ObjToString(p.pullMsg)) - return p.pullMsg, nil + res := p.pullMsg + p.pullMsg = make([]infrastructure.Msg, 0) + return res, nil } // NewProfilingPlugin return New ProfilingPlugin -- Gitee