diff --git a/pkg/session/BUILD.bazel b/pkg/session/BUILD.bazel index d653018239d85..f174ec20699c8 100644 --- a/pkg/session/BUILD.bazel +++ b/pkg/session/BUILD.bazel @@ -12,7 +12,6 @@ go_library( "testutil.go", #keep "tidb.go", "txn.go", - "txnmanager.go", ], importpath = "github.com/pingcap/tidb/pkg/session", visibility = ["//visibility:public"], @@ -58,8 +57,6 @@ go_library( "//pkg/sessionctx/stmtctx", "//pkg/sessionctx/variable", "//pkg/sessiontxn", - "//pkg/sessiontxn/isolation", - "//pkg/sessiontxn/staleread", "//pkg/statistics/handle/usage", "//pkg/store/driver/error", "//pkg/store/driver/txn", @@ -111,7 +108,6 @@ go_library( "@io_etcd_go_etcd_client_v3//concurrency", "@org_uber_go_atomic//:atomic", "@org_uber_go_zap//:zap", - "@org_uber_go_zap//zapcore", ], ) diff --git a/pkg/session/txnmanager/BUILD.bazel b/pkg/session/txnmanager/BUILD.bazel new file mode 100644 index 0000000000000..3305d7ef91db4 --- /dev/null +++ b/pkg/session/txnmanager/BUILD.bazel @@ -0,0 +1,23 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "txnmanager", + srcs = ["txnmanager.go"], + importpath = "github.com/pingcap/tidb/pkg/session/txnmanager", + visibility = ["//visibility:public"], + deps = [ + "//pkg/infoschema", + "//pkg/kv", + "//pkg/parser", + "//pkg/parser/ast", + "//pkg/sessionctx", + "//pkg/sessiontxn", + "//pkg/sessiontxn/isolation", + "//pkg/sessiontxn/staleread", + "//pkg/util/logutil", + "@com_github_pingcap_errors//:errors", + "@com_github_pingcap_failpoint//:failpoint", + "@org_uber_go_zap//:zap", + "@org_uber_go_zap//zapcore", + ], +) diff --git a/pkg/session/txnmanager.go b/pkg/session/txnmanager/txnmanager.go similarity index 99% rename from pkg/session/txnmanager.go rename to pkg/session/txnmanager/txnmanager.go index 4caf790643e2e..ca0a996026518 100644 --- a/pkg/session/txnmanager.go +++ b/pkg/session/txnmanager/txnmanager.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package session +package txnmanager import ( "context"