Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Add validate backupmeta cmd#78

Closed
5kbpers wants to merge 4 commits intopingcap:masterfrom
5kbpers:validate-file
Closed

Add validate backupmeta cmd#78
5kbpers wants to merge 4 commits intopingcap:masterfrom
5kbpers:validate-file

Conversation

@5kbpers
Copy link
Contributor

@5kbpers 5kbpers commented Dec 3, 2019

Signed-off-by: 5kbpers tangminghua@pingcap.com

  1. add validate backupmeta cmd
  2. rename cmd/meta to cmd/validate
  3. check if rewrite rules and the ranges of the files are valid

@codecov
Copy link

codecov bot commented Dec 3, 2019

Codecov Report

Merging #78 into master will decrease coverage by 2.3%.
The diff coverage is 71.6%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #78      +/-   ##
========================================
- Coverage   73.31%    71%   -2.31%     
========================================
  Files          30     30              
  Lines        2908   2766     -142     
========================================
- Hits         2132   1964     -168     
- Misses        474    528      +54     
+ Partials      302    274      -28
Impacted Files Coverage Δ
pkg/backup/range_tree.go 91.89% <0%> (ø) ⬆️
cmd/restore.go 56.83% <22.22%> (-14.67%) ⬇️
pkg/restore/import.go 73.79% <50%> (-0.99%) ⬇️
cmd/validate.go 71.85% <71.85%> (ø)
pkg/restore/util.go 88.26% <92.3%> (+5.56%) ⬆️
pkg/restore/client.go 73.68% <0%> (-9.17%) ⬇️
pkg/backup/client.go 71.17% <0%> (-0.23%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd51353...73cffc3. Read the comment docs.

Signed-off-by: 5kbpers <tangminghua@pingcap.com>
@5kbpers 5kbpers changed the title restore: validate the range of files before split add validate backupmeta cmd Dec 3, 2019
@5kbpers 5kbpers changed the title add validate backupmeta cmd Add validate backupmeta cmd Dec 3, 2019
Signed-off-by: 5kbpers <tangminghua@pingcap.com>
@5kbpers
Copy link
Contributor Author

5kbpers commented Dec 3, 2019

/run-integration-test

Comment on lines +196 to +197
// Simulate to create table
for _, table := range tables {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's so coooooool!

Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
calculated sha256 is %s,
origin sha256 is %s`, file.Name, hex.EncodeToString(s[:]), hex.EncodeToString(file.Sha256))
}
log.Info("table info", zap.Stringer("table", tblInfo.Name),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this log out of for _, schema := range backupMeta.Schemas loop?

@5kbpers 5kbpers mentioned this pull request Dec 12, 2019
@overvenus overvenus closed this Dec 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants