Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#45486
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
lyzx2001 authored and ti-chi-bot committed Aug 7, 2023
1 parent fe7bcf1 commit 6e06cdc
Show file tree
Hide file tree
Showing 5 changed files with 2,142 additions and 0 deletions.
189 changes: 189 additions & 0 deletions br/pkg/lightning/importer/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "importer",
srcs = [
"check_info.go",
"check_template.go",
"checksum_helper.go",
"chunk_process.go",
"dup_detect.go",
"get_pre_info.go",
"import.go",
"meta_manager.go",
"precheck.go",
"precheck_impl.go",
"table_import.go",
"tidb.go",
],
importpath = "github.com/pingcap/tidb/br/pkg/lightning/importer",
visibility = ["//visibility:public"],
deps = [
"//br/pkg/backup",
"//br/pkg/errors",
"//br/pkg/lightning/backend",
"//br/pkg/lightning/backend/encode",
"//br/pkg/lightning/backend/kv",
"//br/pkg/lightning/backend/local",
"//br/pkg/lightning/backend/tidb",
"//br/pkg/lightning/checkpoints",
"//br/pkg/lightning/common",
"//br/pkg/lightning/config",
"//br/pkg/lightning/duplicate",
"//br/pkg/lightning/errormanager",
"//br/pkg/lightning/importer/opts",
"//br/pkg/lightning/log",
"//br/pkg/lightning/metric",
"//br/pkg/lightning/mydump",
"//br/pkg/lightning/precheck",
"//br/pkg/lightning/tikv",
"//br/pkg/lightning/verification",
"//br/pkg/lightning/web",
"//br/pkg/lightning/worker",
"//br/pkg/pdutil",
"//br/pkg/redact",
"//br/pkg/storage",
"//br/pkg/streamhelper",
"//br/pkg/utils",
"//br/pkg/version",
"//br/pkg/version/build",
"//config",
"//ddl",
"//errno",
"//keyspace",
"//kv",
"//meta/autoid",
"//parser",
"//parser/ast",
"//parser/format",
"//parser/model",
"//parser/mysql",
"//planner/core",
"//sessionctx/variable",
"//store/driver",
"//store/driver/txn",
"//store/pdtypes",
"//table",
"//table/tables",
"//tablecodec",
"//types",
"//util/codec",
"//util/collate",
"//util/dbterror",
"//util/engine",
"//util/extsort",
"//util/mathutil",
"//util/mock",
"//util/regexpr-router",
"//util/set",
"@com_github_coreos_go_semver//semver",
"@com_github_docker_go_units//:go-units",
"@com_github_go_sql_driver_mysql//:mysql",
"@com_github_google_uuid//:uuid",
"@com_github_jedib0t_go_pretty_v6//table",
"@com_github_jedib0t_go_pretty_v6//text",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_failpoint//:failpoint",
"@com_github_pingcap_kvproto//pkg/metapb",
"@com_github_prometheus_client_golang//prometheus",
"@com_github_tikv_client_go_v2//config",
"@com_github_tikv_client_go_v2//util",
"@com_github_tikv_pd_client//:client",
"@io_etcd_go_etcd_client_v3//:client",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//codes",
"@org_golang_google_grpc//status",
"@org_golang_x_exp//maps",
"@org_golang_x_exp//slices",
"@org_golang_x_sync//errgroup",
"@org_uber_go_atomic//:atomic",
"@org_uber_go_multierr//:multierr",
"@org_uber_go_zap//:zap",
],
)

go_test(
name = "importer_test",
timeout = "short",
srcs = [
"check_info_test.go",
"chunk_process_test.go",
"dup_detect_test.go",
"get_pre_info_test.go",
"import_test.go",
"meta_manager_test.go",
"precheck_impl_test.go",
"precheck_test.go",
"restore_schema_test.go",
"table_import_test.go",
"tidb_test.go",
],
embed = [":importer"],
flaky = True,
shard_count = 50,
deps = [
"//br/pkg/lightning/backend",
"//br/pkg/lightning/backend/encode",
"//br/pkg/lightning/backend/kv",
"//br/pkg/lightning/backend/local",
"//br/pkg/lightning/backend/tidb",
"//br/pkg/lightning/checkpoints",
"//br/pkg/lightning/common",
"//br/pkg/lightning/config",
"//br/pkg/lightning/duplicate",
"//br/pkg/lightning/errormanager",
"//br/pkg/lightning/importer/mock",
"//br/pkg/lightning/importer/opts",
"//br/pkg/lightning/log",
"//br/pkg/lightning/metric",
"//br/pkg/lightning/mydump",
"//br/pkg/lightning/precheck",
"//br/pkg/lightning/verification",
"//br/pkg/lightning/web",
"//br/pkg/lightning/worker",
"//br/pkg/mock",
"//br/pkg/storage",
"//br/pkg/streamhelper",
"//br/pkg/version/build",
"//ddl",
"//errno",
"//kv",
"//meta",
"//meta/autoid",
"//parser",
"//parser/ast",
"//parser/model",
"//parser/mysql",
"//store/mockstore",
"//store/pdtypes",
"//table/tables",
"//tablecodec",
"//types",
"//util/codec",
"//util/dbutil",
"//util/extsort",
"//util/mock",
"//util/promutil",
"//util/table-filter",
"//util/table-router",
"@com_github_data_dog_go_sqlmock//:go-sqlmock",
"@com_github_docker_go_units//:go-units",
"@com_github_go_sql_driver_mysql//:mysql",
"@com_github_golang_mock//gomock",
"@com_github_google_uuid//:uuid",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_failpoint//:failpoint",
"@com_github_pingcap_kvproto//pkg/metapb",
"@com_github_stretchr_testify//require",
"@com_github_stretchr_testify//suite",
"@com_github_tikv_client_go_v2//config",
"@com_github_tikv_client_go_v2//testutils",
"@com_github_tikv_pd_client//:client",
"@com_github_xitongsys_parquet_go//writer",
"@com_github_xitongsys_parquet_go_source//buffer",
"@io_etcd_go_etcd_client_v3//:client",
"@io_etcd_go_etcd_tests_v3//integration",
"@org_golang_x_exp//slices",
"@org_uber_go_zap//:zap",
],
)
Loading

0 comments on commit 6e06cdc

Please sign in to comment.