mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Update minio_node_bucket_scans_finished metrics (#17006)
This commit is contained in:
parent
10693fddfa
commit
6877578bbc
@ -435,11 +435,19 @@ func (s *xlStorage) readMetadata(ctx context.Context, itemPath string) ([]byte,
|
||||
func (s *xlStorage) NSScanner(ctx context.Context, cache dataUsageCache, updates chan<- dataUsageEntry, scanMode madmin.HealScanMode) (dataUsageCache, error) {
|
||||
atomic.AddInt32(&s.scanning, 1)
|
||||
defer atomic.AddInt32(&s.scanning, -1)
|
||||
var err error
|
||||
stopFn := globalScannerMetrics.log(scannerMetricScanBucketDrive, s.diskPath, cache.Info.Name)
|
||||
defer func() {
|
||||
res := make(map[string]string)
|
||||
if err != nil {
|
||||
res["err"] = err.Error()
|
||||
}
|
||||
stopFn(res)
|
||||
}()
|
||||
|
||||
// Updates must be closed before we return.
|
||||
defer close(updates)
|
||||
var lc *lifecycle.Lifecycle
|
||||
var err error
|
||||
|
||||
// Check if the current bucket has a configured lifecycle policy
|
||||
if globalLifecycleSys != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user