forked from TrueCloudLab/restic
repository: remove IsMixedPack and add replacement for checker
Repositories with mixed packs are probably quite rare by now. When loading data blobs from a mixed pack file, this will no longer trigger caching that file. However, usually tree blobs are accessed first such that this shouldn't make much of a difference. The checker gets a simpler replacement.
This commit is contained in:
parent
a61fbd287a
commit
ddcf549eba
5 changed files with 24 additions and 57 deletions
|
@ -106,18 +106,6 @@ func (mi *MasterIndex) Has(bh restic.BlobHandle) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (mi *MasterIndex) IsMixedPack(packID restic.ID) bool {
|
||||
mi.idxMutex.RLock()
|
||||
defer mi.idxMutex.RUnlock()
|
||||
|
||||
for _, idx := range mi.idx {
|
||||
if idx.MixedPacks().Has(packID) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// IDs returns the IDs of all indexes contained in the index.
|
||||
func (mi *MasterIndex) IDs() restic.IDSet {
|
||||
mi.idxMutex.RLock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue