Skip to content

Commit

Permalink
audit: Add the drives where the dangling object is removed (minio#18737)
Browse files Browse the repository at this point in the history
  • Loading branch information
vadmeste authored Jan 5, 2024
1 parent 42dc632 commit 04135fa
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion cmd/erasure-object.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,22 @@ func (er erasureObjects) deleteIfDangling(ctx context.Context, bucket, object st
}, index)
}

g.Wait()
rmDisks := make(map[string]string, len(disks))
for index, err := range g.Wait() {
var errStr, diskName string
if err != nil {
errStr = err.Error()
} else {
errStr = "<nil>"
}
if disks[index] != nil {
diskName = disks[index].String()
} else {
diskName = fmt.Sprintf("disk-%d", index)
}
rmDisks[diskName] = errStr
}
tags["cleanupResult"] = rmDisks
}
return m, err
}
Expand Down

0 comments on commit 04135fa

Please sign in to comment.