mirror of
https://github.com/minio/minio.git
synced 2025-12-08 16:53:11 -05:00
Make sure to re-load reference format after HealFormat (#5772)
This PR introduces ReloadFormat API call at objectlayer to facilitate this. Previously we repurposed HealFormat but we never ended up updating our reference format on peers. Fixes #5700
This commit is contained in:
committed by
Nitish Tiwari
parent
ae8e863ff4
commit
1d31ad499f
@@ -539,11 +539,17 @@ func (h *healSequence) healDiskFormat() error {
|
||||
}
|
||||
|
||||
res, err := objectAPI.HealFormat(h.ctx, h.settings.DryRun)
|
||||
if err != nil {
|
||||
// return any error, ignore error returned when disks have
|
||||
// already healed.
|
||||
if err != nil && err != errNoHealRequired {
|
||||
return errFnHealFromAPIErr(err)
|
||||
}
|
||||
|
||||
peersReInitFormat(globalAdminPeers, h.settings.DryRun)
|
||||
// Healing succeeded notify the peers to reload format and re-initialize disks.
|
||||
// We will not notify peers only if healing succeeded.
|
||||
if err == nil {
|
||||
peersReInitFormat(globalAdminPeers, h.settings.DryRun)
|
||||
}
|
||||
|
||||
// Push format heal result
|
||||
return h.pushHealResultItem(res)
|
||||
|
||||
Reference in New Issue
Block a user