Merge pull request #8701 from djdongjin/gc
Remove unnecessary label bucket loop
This commit is contained in:
commit
ad9d1a82f1
@ -719,15 +719,8 @@ func isSharedContent(tx *bolt.Tx, dgst digest.Digest) bool {
|
|||||||
if lbkt == nil {
|
if lbkt == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// iterate through each label
|
if sharedNS := lbkt.Get([]byte(labels.LabelSharedNamespace)); sharedNS != nil && string(sharedNS) == "true" && getBlobBucket(tx, ns, dgst) != nil {
|
||||||
lbc := lbkt.Cursor()
|
return true
|
||||||
for k, v := lbc.First(); k != nil; k, v = lbc.Next() {
|
|
||||||
if string(k) == labels.LabelSharedNamespace {
|
|
||||||
if string(v) == "true" && getBlobBucket(tx, ns, dgst) != nil {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user