mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix: Prometheus metrics to re-use storage disks (#11647)
also re-use storage disks for all `mc admin server info` calls as well, implement a new LocalStorageInfo() API call at ObjectLayer to lookup local disks storageInfo also fixes bugs where there were double calls to StorageInfo()
This commit is contained in:
@@ -23,6 +23,16 @@ import (
|
||||
"github.com/minio/minio/pkg/sync/errgroup"
|
||||
)
|
||||
|
||||
func (er erasureObjects) getLocalDisks() (localDisks []StorageAPI) {
|
||||
disks := er.getDisks()
|
||||
for _, disk := range disks {
|
||||
if disk != nil && disk.IsLocal() {
|
||||
localDisks = append(localDisks, disk)
|
||||
}
|
||||
}
|
||||
return localDisks
|
||||
}
|
||||
|
||||
func (er erasureObjects) getLoadBalancedLocalDisks() (newDisks []StorageAPI) {
|
||||
disks := er.getDisks()
|
||||
// Based on the random shuffling return back randomized disks.
|
||||
|
||||
Reference in New Issue
Block a user