Optimize background heal status to use LocalStorageInfo (#16414)

This commit is contained in:
Anis Elleuch authored and GitHub committed 2023-01-17 05:02:00 +05:30
1 parent 095fc0561d
commit 3039fd4519
5 files changed
+8 -8

No files matched your search

+3 -3
View File
@@ -70,8 +70,8 @@ func newBgHealSequence() *healSequence {
}
}
// getBackgroundHealStatus will return the
func getBackgroundHealStatus(ctx context.Context, o ObjectLayer) (madmin.BgHealState, bool) {
// getLocalBackgroundHealStatus will return the heal status of the local node
func getLocalBackgroundHealStatus(ctx context.Context, o ObjectLayer) (madmin.BgHealState, bool) {
if globalBackgroundHealState == nil {
return madmin.BgHealState{}, false
}
@@ -105,7 +105,7 @@ func getBackgroundHealStatus(ctx context.Context, o ObjectLayer) (madmin.BgHealS
return status, true
}
si := o.StorageInfo(ctx)
si := o.LocalStorageInfo(ctx)
indexed := make(map[string][]madmin.Disk)
for _, disk := range si.Disks {