mirror of
https://github.com/pgsty/minio.git
synced 2026-08-04 15:12:47 +03:00
Always add existing cache when skipping (#9862)
This commit is contained in:
+4
-2
@@ -261,9 +261,11 @@ func (xl xlObjects) crawlAndGetDataUsage(ctx context.Context, buckets []BucketIn
|
|||||||
for _, b := range buckets {
|
for _, b := range buckets {
|
||||||
e := oldCache.find(b.Name)
|
e := oldCache.find(b.Name)
|
||||||
if e != nil {
|
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
|
bucketCh <- b
|
||||||
cache.replace(b.Name, dataUsageRoot, *e)
|
|
||||||
} else {
|
} else {
|
||||||
if intDataUpdateTracker.debug {
|
if intDataUpdateTracker.debug {
|
||||||
logger.Info(color.Green("crawlAndGetDataUsage:")+" Skipping bucket %v, not updated", b.Name)
|
logger.Info(color.Green("crawlAndGetDataUsage:")+" Skipping bucket %v, not updated", b.Name)
|
||||||
|
|||||||
Reference in New Issue
Block a user