Reduce memory usage for prune
This commit is contained in:
parent
094e80f4a4
commit
0556687584
1 changed files with 2 additions and 3 deletions
|
@ -46,9 +46,8 @@ func (mi *MasterIndex) LookupSize(id restic.ID, tpe restic.BlobType) (uint, erro
|
||||||
defer mi.idxMutex.RUnlock()
|
defer mi.idxMutex.RUnlock()
|
||||||
|
|
||||||
for _, idx := range mi.idx {
|
for _, idx := range mi.idx {
|
||||||
length, err := idx.LookupSize(id, tpe)
|
if idx.Has(id, tpe) {
|
||||||
if err == nil {
|
return idx.LookupSize(id, tpe)
|
||||||
return length, nil
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue