Skip to content

Commit

Permalink
meta: set progress to 0 when total size is 0 (zilliztech#554)
Browse files Browse the repository at this point in the history
Signed-off-by: huanghaoyuanhhy <[email protected]>
  • Loading branch information
huanghaoyuanhhy authored Feb 25, 2025
1 parent bf091f9 commit 2eb37e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/meta/backup_meta_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ func (meta *MetaManager) GetFullMeta(id string) *backuppb.BackupInfo {
if totalSize != 0 {
cloneBackup.Progress = int32(float64(backupedSize) / float64(totalSize) * 100)
} else {
cloneBackup.Progress = 100
cloneBackup.Progress = 0
}
log.Info("Get backup", zap.String("state", cloneBackup.StateCode.String()), zap.Int64("backupedSize", backupedSize), zap.Int64("totalSize", totalSize), zap.Int32("progress", cloneBackup.Progress))
return cloneBackup
Expand Down

0 comments on commit 2eb37e7

Please sign in to comment.