mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
removes FileSize from backup part key (#1872)
* removes FileSize from backup part key it should fix download restoration for backups * Update lib/backup/common/part.go Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
This commit is contained in:
parent
5881c4ae48
commit
06eff5a72c
2 changed files with 2 additions and 4 deletions
|
@ -133,9 +133,6 @@ func (r *Restore) Run() error {
|
|||
}
|
||||
deleteSize += size
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := dst.RemoveEmptyDirs(); err != nil {
|
||||
return fmt.Errorf("cannot remove empty directories at %s: %w", dst, err)
|
||||
}
|
||||
|
|
|
@ -34,7 +34,8 @@ type Part struct {
|
|||
}
|
||||
|
||||
func (p *Part) key() string {
|
||||
return fmt.Sprintf("%s%016X%016X%016X%016X", p.Path, p.FileSize, p.Offset, p.Size, p.ActualSize)
|
||||
// Do not use p.FileSize in the key, since it cannot be properly initialized when resuming the restore for partially restored file
|
||||
return fmt.Sprintf("%s%016X%016X%016X", p.Path, p.Offset, p.Size, p.ActualSize)
|
||||
}
|
||||
|
||||
// String returns human-readable representation of the part.
|
||||
|
|
Loading…
Reference in a new issue