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