mirror of
https://github.com/minio/minio.git
synced 2026-06-09 08:58:01 -04:00
Update minio_node_bucket_scans_finished metrics (#17006)
This commit is contained in:
parent
10693fddfa
commit
6877578bbc
1 changed files with 9 additions and 1 deletions
|
|
@ -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 a new issue