-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[close #108] Br debug checksum cmd #114
Conversation
Signed-off-by: haojinming <[email protected]>
Signed-off-by: haojinming <[email protected]> add warning Signed-off-by: haojinming <[email protected]> revert changes Signed-off-by: haojinming <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM~
br/pkg/restore/client.go
Outdated
@@ -64,12 +67,17 @@ func NewRestoreClient( | |||
keepaliveConf keepalive.ClientParameters, | |||
isRawKv bool, | |||
) (*Client, error) { | |||
apiVerion, err := backup.GetTiKVApiVersion(context.Background(), pdClient, tlsConf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a little strange to use a method from backup
in restore procedure. It would be better to move GetTiKVApiVersion
as a common method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to common conn
package, thanks for the good suggestion.
br/pkg/task/backup_raw.go
Outdated
@@ -58,10 +58,10 @@ func DefineRawBackupFlags(command *cobra.Command) { | |||
} | |||
|
|||
// CalcChecksumFromBackupMeta read the backup meta and return Checksum | |||
func CalcChecksumFromBackupMeta(ctx context.Context, curAPIVersion kvrpcpb.APIVersion, cfg *Config) (checksum.Checksum, []*utils.KeyRange, error) { | |||
func CalcChecksumFromBackupMeta(ctx context.Context, curAPIVersion kvrpcpb.APIVersion, cfg *Config) (*backuppb.BackupMeta, checksum.Checksum, []*utils.KeyRange, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe better to get backupMeta
outside then pass in here. As what "CalcChecksumFromBackupMeta" says.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: haojinming <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM~
What problem does this PR solve?
Issue Number: close #108
Problem Description:
Checksum maybe mismatch if data expired during backup/restore.
What is changed and how does it work?
Code changes
Check List for Tests
This PR has been tested by at least one of the following methods:
Side effects
Related changes