Skip to content

Commit

Permalink
Fix progress may out of data range (#391)
Browse files Browse the repository at this point in the history
Signed-off-by: wayblink <[email protected]>
  • Loading branch information
wayblink authored Aug 9, 2024
1 parent 730ace1 commit b049ab1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/backup_meta_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ func (meta *MetaManager) GetFullMeta(id string) *backuppb.BackupInfo {
}
cloneBackup.CollectionBackups = collectionBackups
if totalSize != 0 {
cloneBackup.Progress = int32(backupedSize * 100 / (totalSize))
cloneBackup.Progress = int32(float64(backupedSize) / float64(totalSize) * 100)
} else {
cloneBackup.Progress = 100
}
Expand Down

0 comments on commit b049ab1

Please sign in to comment.