mirror of
https://github.com/octoleo/restic.git
synced 2024-12-24 11:55:28 +00:00
Reduce memory usage for prune
This commit is contained in:
parent
094e80f4a4
commit
0556687584
@ -46,9 +46,8 @@ func (mi *MasterIndex) LookupSize(id restic.ID, tpe restic.BlobType) (uint, erro
|
||||
defer mi.idxMutex.RUnlock()
|
||||
|
||||
for _, idx := range mi.idx {
|
||||
length, err := idx.LookupSize(id, tpe)
|
||||
if err == nil {
|
||||
return length, nil
|
||||
if idx.Has(id, tpe) {
|
||||
return idx.LookupSize(id, tpe)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user