Skip to content

Commit

Permalink
Merge branch 'master' into fix_reuse_bug
Browse files Browse the repository at this point in the history
  • Loading branch information
keeplearning20221 authored Nov 8, 2022
2 parents 78a7f9f + 96708ad commit 1e8259b
Show file tree
Hide file tree
Showing 5 changed files with 2,198 additions and 311 deletions.
1 change: 0 additions & 1 deletion br/pkg/restore/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ go_test(
"//testkit/testsetup",
"//types",
"//util/codec",
"//util/mathutil",
"@com_github_fsouza_fake_gcs_server//fakestorage",
"@com_github_golang_protobuf//proto",
"@com_github_pingcap_errors//:errors",
Expand Down
11 changes: 9 additions & 2 deletions br/pkg/restore/log_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,19 @@ func testReadFromMetadataWithVersion(t *testing.T, m metaMaker) {

meta := new(StreamMetadataSet)
meta.Helper = stream.NewMetadataHelper()
meta.LoadUntil(ctx, loc, c.untilTS)
meta.LoadUntilAndCalculateShiftTS(ctx, loc, c.untilTS)

var metas []*backuppb.Metadata
for _, m := range meta.metadata {
for path := range meta.metadataInfos {
data, err := loc.ReadFile(ctx, path)
require.NoError(t, err)

m, err := meta.Helper.ParseToMetadataHard(data)
require.NoError(t, err)

metas = append(metas, m)
}

actualStoreIDs := make([]int64, 0, len(metas))
for _, meta := range metas {
actualStoreIDs = append(actualStoreIDs, meta.StoreId)
Expand Down
Loading

0 comments on commit 1e8259b

Please sign in to comment.