Skip to content

Commit

Permalink
Merge branch 'master' into display-truncate-value
Browse files Browse the repository at this point in the history
  • Loading branch information
EricZequan authored Sep 6, 2024
2 parents 56a52ef + 5dae1a3 commit 93aa71c
Show file tree
Hide file tree
Showing 197 changed files with 20,653 additions and 13,559 deletions.
12 changes: 6 additions & 6 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6010,13 +6010,13 @@ def go_deps():
name = "com_github_pingcap_kvproto",
build_file_proto_mode = "disable_global",
importpath = "github.com/pingcap/kvproto",
sha256 = "b1af34db24f2650cd2a687fa9c58bd746eb3ca76e08afe5dbe2ac569ce54b597",
strip_prefix = "github.com/pingcap/kvproto@v0.0.0-20240716095229-5f7ffec83ea7",
sha256 = "368b662c8669d91bcd488b780b8ecb273855b8fc54c1043907171bdebc3ffc54",
strip_prefix = "github.com/pingcap/kvproto@v0.0.0-20240904041139-1de8accd5bb7",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/github.com/pingcap/kvproto/com_github_pingcap_kvproto-v0.0.0-20240716095229-5f7ffec83ea7.zip",
"http://ats.apps.svc/gomod/github.com/pingcap/kvproto/com_github_pingcap_kvproto-v0.0.0-20240716095229-5f7ffec83ea7.zip",
"https://cache.hawkingrei.com/gomod/github.com/pingcap/kvproto/com_github_pingcap_kvproto-v0.0.0-20240716095229-5f7ffec83ea7.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/pingcap/kvproto/com_github_pingcap_kvproto-v0.0.0-20240716095229-5f7ffec83ea7.zip",
"http://bazel-cache.pingcap.net:8080/gomod/github.com/pingcap/kvproto/com_github_pingcap_kvproto-v0.0.0-20240904041139-1de8accd5bb7.zip",
"http://ats.apps.svc/gomod/github.com/pingcap/kvproto/com_github_pingcap_kvproto-v0.0.0-20240904041139-1de8accd5bb7.zip",
"https://cache.hawkingrei.com/gomod/github.com/pingcap/kvproto/com_github_pingcap_kvproto-v0.0.0-20240904041139-1de8accd5bb7.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/pingcap/kvproto/com_github_pingcap_kvproto-v0.0.0-20240904041139-1de8accd5bb7.zip",
],
)
go_repository(
Expand Down
7 changes: 4 additions & 3 deletions br/pkg/restore/snap_client/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "snap_client",
srcs = [
"batcher.go",
"client.go",
"import.go",
"pipeline_items.go",
Expand All @@ -30,7 +29,6 @@ go_library(
"//br/pkg/restore/internal/snap_split",
"//br/pkg/restore/split",
"//br/pkg/restore/utils",
"//br/pkg/rtree",
"//br/pkg/storage",
"//br/pkg/summary",
"//br/pkg/utils",
Expand Down Expand Up @@ -68,6 +66,7 @@ go_library(
"@org_golang_x_sync//errgroup",
"@org_uber_go_multierr//:multierr",
"@org_uber_go_zap//:zap",
"@org_uber_go_zap//zapcore",
],
)

Expand All @@ -85,9 +84,10 @@ go_test(
],
embed = [":snap_client"],
flaky = True,
shard_count = 16,
shard_count = 18,
deps = [
"//br/pkg/errors",
"//br/pkg/glue",
"//br/pkg/gluetidb",
"//br/pkg/metautil",
"//br/pkg/mock",
Expand All @@ -97,6 +97,7 @@ go_test(
"//br/pkg/utils",
"//br/pkg/utiltest",
"//pkg/domain",
"//pkg/kv",
"//pkg/meta/model",
"//pkg/parser/model",
"//pkg/parser/mysql",
Expand Down
142 changes: 0 additions & 142 deletions br/pkg/restore/snap_client/batcher.go

This file was deleted.

2 changes: 1 addition & 1 deletion br/pkg/restore/snap_client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ func (rc *SnapClient) WaitForFilesRestored(ctx context.Context, files []*backupp
log.Info("import sst files done", logutil.Files(files))
updateCh.Inc()
}()
return rc.fileImporter.ImportSSTFiles(ectx, []*backuppb.File{fileReplica}, restoreutils.EmptyRewriteRule(), rc.cipher, rc.backupMeta.ApiVersion)
return rc.fileImporter.ImportSSTFiles(ectx, []TableIDWithFiles{{Files: []*backuppb.File{fileReplica}, RewriteRules: restoreutils.EmptyRewriteRule()}}, rc.cipher, rc.backupMeta.ApiVersion)
})
}
if err := eg.Wait(); err != nil {
Expand Down
8 changes: 5 additions & 3 deletions br/pkg/restore/snap_client/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ var (
RestoreLabelKey = restoreLabelKey
RestoreLabelValue = restoreLabelValue

GetSSTMetaFromFile = getSSTMetaFromFile
GetKeyRangeByMode = getKeyRangeByMode
MapTableToFiles = mapTableToFiles
GetSSTMetaFromFile = getSSTMetaFromFile
GetKeyRangeByMode = getKeyRangeByMode
MapTableToFiles = mapTableToFiles
GetFileRangeKey = getFileRangeKey
GetSortedPhysicalTables = getSortedPhysicalTables
)

// MockClient create a fake Client used to test.
Expand Down
Loading

0 comments on commit 93aa71c

Please sign in to comment.