|
|
|
@ -33,6 +33,7 @@ import ( |
|
|
|
|
"github.com/minio/minio-go/v7/pkg/tags" |
|
|
|
|
"github.com/minio/minio/cmd/config/storageclass" |
|
|
|
|
"github.com/minio/minio/cmd/logger" |
|
|
|
|
"github.com/minio/minio/pkg/color" |
|
|
|
|
"github.com/minio/minio/pkg/dsync" |
|
|
|
|
"github.com/minio/minio/pkg/madmin" |
|
|
|
|
"github.com/minio/minio/pkg/sync/errgroup" |
|
|
|
@ -332,6 +333,12 @@ func (z *erasureServerPools) CrawlAndGetDataUsage(ctx context.Context, bf *bloom |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if len(allBuckets) == 0 { |
|
|
|
|
logger.Info(color.Green("data-crawl:") + " No buckets found, skipping crawl") |
|
|
|
|
updates <- DataUsageInfo{} // no buckets found update data usage to reflect latest state
|
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Crawl latest allBuckets first.
|
|
|
|
|
sort.Slice(allBuckets, func(i, j int) bool { |
|
|
|
|
return allBuckets[i].Created.After(allBuckets[j].Created) |
|
|
|
|