Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/release-6.5' into cherry-pick-…
Browse files Browse the repository at this point in the history
…39011-to-release-6.5
  • Loading branch information
time-and-fate committed Feb 14, 2023
2 parents 33bfe58 + c85789c commit 54b2f57
Show file tree
Hide file tree
Showing 160 changed files with 3,493 additions and 1,006 deletions.
4 changes: 2 additions & 2 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3519,8 +3519,8 @@ def go_deps():
name = "com_github_tikv_client_go_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/tikv/client-go/v2",
sum = "h1:/glZOHs/K2pkCioDVae+aThUHFYRYQkEgY4NUTgfh+s=",
version = "v2.0.3",
sum = "h1:AyFCezjYx4KYXuyPM5o38lYqh5UdR0OM36UEocOx+Hs=",
version = "v2.0.4-0.20230131081004-cd83d1507d70",
)
go_repository(
name = "com_github_tikv_pd_client",
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ go_download_sdk(
"https://mirrors.aliyun.com/golang/{}",
"https://dl.google.com/go/{}",
],
version = "1.19.3",
version = "1.19.5",
)

go_register_toolchains(
Expand Down
10 changes: 5 additions & 5 deletions br/pkg/backup/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,13 @@ func (bc *Client) StartCheckpointRunner(
}
}

bc.checkpointRunner = checkpoint.StartCheckpointRunner(ctx, bc.storage, bc.cipher)
return nil
bc.checkpointRunner, err = checkpoint.StartCheckpointRunner(ctx, bc.storage, bc.cipher, bc.mgr.GetPDClient())
return errors.Trace(err)
}

func (bc *Client) WaitForFinishCheckpoint() {
func (bc *Client) WaitForFinishCheckpoint(ctx context.Context) {
if bc.checkpointRunner != nil {
bc.checkpointRunner.WaitForFinish()
bc.checkpointRunner.WaitForFinish(ctx)
}
}

Expand Down Expand Up @@ -529,7 +529,7 @@ func BuildBackupRangeAndSchema(

for _, dbInfo := range dbs {
// skip system databases
if !tableFilter.MatchSchema(dbInfo.Name.O) || util.IsMemDB(dbInfo.Name.L) {
if !tableFilter.MatchSchema(dbInfo.Name.O) || util.IsMemDB(dbInfo.Name.L) || utils.IsTemplateSysDB(dbInfo.Name) {
continue
}

Expand Down
3 changes: 1 addition & 2 deletions br/pkg/backup/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,9 @@ func (push *pushDown) pushBackup(
if len(errMsg) <= 0 {
errMsg = errPb.Msg
}
return errors.Annotatef(berrors.ErrKVStorage, "error happen in store %v at %s: %s %s",
return errors.Annotatef(berrors.ErrKVStorage, "error happen in store %v at %s: %s",
store.GetId(),
redact.String(store.GetAddress()),
req.StorageBackend.String(),
errMsg,
)
}
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/backup/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (ss *Schemas) BackupSchemas(

var checksum *checkpoint.ChecksumItem
var exists bool = false
if ss.checkpointChecksum != nil {
if ss.checkpointChecksum != nil && schema.tableInfo != nil {
checksum, exists = ss.checkpointChecksum[schema.tableInfo.ID]
}
workerPool.ApplyOnErrorGroup(errg, func() error {
Expand Down
2 changes: 2 additions & 0 deletions br/pkg/checkpoint/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ go_library(
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_kvproto//pkg/brpb",
"@com_github_pingcap_log//:log",
"@com_github_tikv_client_go_v2//oracle",
"@org_uber_go_zap//:zap",
],
)
Expand All @@ -29,5 +30,6 @@ go_test(
"@com_github_pingcap_kvproto//pkg/brpb",
"@com_github_pingcap_kvproto//pkg/encryptionpb",
"@com_github_stretchr_testify//require",
"@com_github_tikv_client_go_v2//oracle",
],
)
Loading

0 comments on commit 54b2f57

Please sign in to comment.