@ -61,7 +61,6 @@ go_library(
|
||||
"//pkg/util",
|
||||
"//pkg/util/backoff",
|
||||
"//pkg/util/disttask",
|
||||
"//pkg/util/etcd",
|
||||
"//pkg/util/logutil",
|
||||
"//pkg/util/promutil",
|
||||
"@com_github_docker_go_units//:go-units",
|
||||
@ -70,6 +69,7 @@ go_library(
|
||||
"@com_github_pingcap_failpoint//:failpoint",
|
||||
"@com_github_prometheus_client_golang//prometheus",
|
||||
"@com_github_tikv_client_go_v2//util",
|
||||
"@io_etcd_go_etcd_client_v3//:client",
|
||||
"@org_uber_go_atomic//:atomic",
|
||||
"@org_uber_go_zap//:zap",
|
||||
"@org_uber_go_zap//zapcore",
|
||||
|
||||
@ -41,8 +41,8 @@ import (
|
||||
"github.com/pingcap/tidb/pkg/util"
|
||||
"github.com/pingcap/tidb/pkg/util/backoff"
|
||||
disttaskutil "github.com/pingcap/tidb/pkg/util/disttask"
|
||||
"github.com/pingcap/tidb/pkg/util/etcd"
|
||||
"github.com/pingcap/tidb/pkg/util/logutil"
|
||||
clientv3 "go.etcd.io/etcd/client/v3"
|
||||
"go.uber.org/atomic"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
@ -64,7 +64,7 @@ type taskInfo struct {
|
||||
lastRegisterTime time.Time
|
||||
|
||||
// initialized lazily in register()
|
||||
etcdClient *etcd.Client
|
||||
etcdClient *clientv3.Client
|
||||
taskRegister utils.TaskRegister
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ func (t *taskInfo) register(ctx context.Context) {
|
||||
return
|
||||
}
|
||||
t.etcdClient = client
|
||||
t.taskRegister = NewTaskRegisterWithTTL(client.GetClient(), registerTaskTTL,
|
||||
t.taskRegister = NewTaskRegisterWithTTL(client, registerTaskTTL,
|
||||
utils.RegisterImportInto, strconv.FormatInt(t.taskID, 10))
|
||||
}
|
||||
timeoutCtx, cancel := context.WithTimeout(ctx, registerTimeout)
|
||||
|
||||
Reference in New Issue
Block a user