Skip to content

Commit

Permalink
br:backup: If make a backup of empty db, should get a success summary (
Browse files Browse the repository at this point in the history
  • Loading branch information
joccau authored Aug 24, 2021
1 parent 106b4dd commit 5516d7d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion br/pkg/task/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,12 @@ func RunBackup(c context.Context, g glue.Glue, cmdName string, cfg *BackupConfig
pdAddress := strings.Join(cfg.PD, ",")
log.Warn("Nothing to backup, maybe connected to cluster for restoring",
zap.String("PD address", pdAddress))
return metawriter.FlushBackupMeta(ctx)

err = metawriter.FlushBackupMeta(ctx)
if err == nil {
summary.SetSuccessStatus(true)
}
return err
}

if isIncrementalBackup {
Expand Down

0 comments on commit 5516d7d

Please sign in to comment.