diff --git a/ddl/ddl.go b/ddl/ddl.go index 7ea6969353547..e8063fdaf1705 100644 --- a/ddl/ddl.go +++ b/ddl/ddl.go @@ -277,9 +277,9 @@ func (dc *ddlCtx) setDDLSourceForDiagnosis(job *model.Job) { ctx, exists := dc.jobCtx.jobCtxMap[job.ID] if !exists { ctx = NewJobContext() + ctx.setDDLLabelForDiagnosis(job) dc.jobCtx.jobCtxMap[job.ID] = ctx } - ctx.setDDLLabelForDiagnosis(job) } func (dc *ddlCtx) getResourceGroupTaggerForTopSQL(job *model.Job) tikvrpc.ResourceGroupTagger { diff --git a/executor/BUILD.bazel b/executor/BUILD.bazel index 9d7e0c902449f..10ce00aa7e940 100644 --- a/executor/BUILD.bazel +++ b/executor/BUILD.bazel @@ -120,6 +120,7 @@ go_library( "//parser/model", "//parser/mysql", "//parser/terror", + "//parser/types", "//planner", "//planner/core", "//planner/util", @@ -215,6 +216,7 @@ go_library( "@com_github_tikv_client_go_v2//oracle", "@com_github_tikv_client_go_v2//tikv", "@com_github_tikv_client_go_v2//tikvrpc", + "@com_github_tikv_client_go_v2//txnkv", "@com_github_tikv_client_go_v2//txnkv/txnlock", "@com_github_tikv_client_go_v2//txnkv/txnsnapshot", "@com_github_tikv_client_go_v2//util", @@ -342,6 +344,7 @@ go_test( "//kv", "//meta", "//meta/autoid", + "//metrics", "//parser", "//parser/ast", "//parser/auth", @@ -419,6 +422,8 @@ go_test( "@com_github_pingcap_sysutil//:sysutil", "@com_github_pingcap_tipb//go-binlog", "@com_github_pingcap_tipb//go-tipb", + "@com_github_prometheus_client_golang//prometheus", + "@com_github_prometheus_client_model//go", "@com_github_prometheus_common//model", "@com_github_stretchr_testify//require", "@com_github_tikv_client_go_v2//oracle", diff --git a/store/driver/txn/BUILD.bazel b/store/driver/txn/BUILD.bazel index fc5bd8a2d7037..15e3c56cb6320 100644 --- a/store/driver/txn/BUILD.bazel +++ b/store/driver/txn/BUILD.bazel @@ -36,6 +36,7 @@ go_library( "@com_github_tikv_client_go_v2//tikv", "@com_github_tikv_client_go_v2//tikvrpc", "@com_github_tikv_client_go_v2//tikvrpc/interceptor", + "@com_github_tikv_client_go_v2//txnkv", "@com_github_tikv_client_go_v2//txnkv/transaction", "@com_github_tikv_client_go_v2//txnkv/txnsnapshot", "@com_github_tikv_client_go_v2//txnkv/txnutil", diff --git a/telemetry/BUILD.bazel b/telemetry/BUILD.bazel index 7cce3b2401d35..15ff2794210fb 100644 --- a/telemetry/BUILD.bazel +++ b/telemetry/BUILD.bazel @@ -60,14 +60,21 @@ go_test( embed = [":telemetry"], deps = [ "//config", + "//ddl", + "//domain", + "//domain/infosync", "//kv", "//session", "//sessionctx", "//sessionctx/variable", + "//store/mockstore", + "//store/mockstore/unistore", "//testkit", "//testkit/testsetup", "@com_github_jeffail_gabs_v2//:gabs", + "@com_github_pingcap_kvproto//pkg/metapb", "@com_github_stretchr_testify//require", + "@com_github_tikv_client_go_v2//testutils", "@io_etcd_go_etcd_tests_v3//integration", "@org_uber_go_goleak//:goleak", ],