From c9d2c47f31d76b9316ec1dac2eea2c4952f98a41 Mon Sep 17 00:00:00 2001 From: ywqzzy <592838129@qq.com> Date: Fri, 23 Feb 2024 13:47:57 +0800 Subject: [PATCH] fix --- pkg/disttask/framework/taskexecutor/manager.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/disttask/framework/taskexecutor/manager.go b/pkg/disttask/framework/taskexecutor/manager.go index 66b0e989043a5..e9b9171e7d00d 100644 --- a/pkg/disttask/framework/taskexecutor/manager.go +++ b/pkg/disttask/framework/taskexecutor/manager.go @@ -359,9 +359,12 @@ func (m *Manager) failSubtask(err error, taskID int64, taskExecutor TaskExecutor func (m *Manager) runWithRetry(fn func() error, msg string) error { backoffer := backoff.NewExponential(scheduler.RetrySQLInterval, 2, scheduler.RetrySQLMaxInterval) err1 := handle.RunWithRetry(m.ctx, scheduler.RetrySQLTimes, backoffer, m.logger, - func(ctx context.Context) (bool, error) { + func(_ context.Context) (bool, error) { return true, fn() }, ) + if err1 != nil { + m.logger.Warn(msg, zap.Error(err1)) + } return err1 }