Always add existing cache when skipping (#9862)

This commit is contained in:
Klaus Post
2020-06-17 09:37:54 -07:00
committed by GitHub
parent b85b18da09
commit a649589d77

View File

@@ -261,9 +261,11 @@ func (xl xlObjects) crawlAndGetDataUsage(ctx context.Context, buckets []BucketIn
for _, b := range buckets {
e := oldCache.find(b.Name)
if e != nil {
if bf == nil || bf.containsDir(b.Name) {
cache.replace(b.Name, dataUsageRoot, *e)
lc, err := globalLifecycleSys.Get(b.Name)
activeLC := err == nil && lc.HasActiveRules("", true)
if activeLC || bf == nil || bf.containsDir(b.Name) {
bucketCh <- b
cache.replace(b.Name, dataUsageRoot, *e)
} else {
if intDataUpdateTracker.debug {
logger.Info(color.Green("crawlAndGetDataUsage:")+" Skipping bucket %v, not updated", b.Name)