mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
Imporve healing and reporting (#11312)
* Provide information on *actively* healing, buckets healed/queued, objects healed/failed. * Add concurrent healing of multiple sets (typically on startup). * Add bucket level resume, so restarts will only heal non-healed buckets. * Print summary after healing a disk is done.
This commit is contained in:
@@ -340,19 +340,6 @@ func loadFormatErasureAll(storageDisks []StorageAPI, heal bool) ([]*formatErasur
|
||||
return formats, g.Wait()
|
||||
}
|
||||
|
||||
func saveHealingTracker(disk StorageAPI, diskID string) error {
|
||||
htracker := healingTracker{
|
||||
ID: diskID,
|
||||
}
|
||||
htrackerBytes, err := htracker.MarshalMsg(nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return disk.WriteAll(context.TODO(), minioMetaBucket,
|
||||
pathJoin(bucketMetaPrefix, slashSeparator, healingTrackerFilename),
|
||||
htrackerBytes)
|
||||
}
|
||||
|
||||
func saveFormatErasure(disk StorageAPI, format *formatErasureV3, heal bool) error {
|
||||
if disk == nil || format == nil {
|
||||
return errDiskNotFound
|
||||
@@ -387,7 +374,9 @@ func saveFormatErasure(disk StorageAPI, format *formatErasureV3, heal bool) erro
|
||||
|
||||
disk.SetDiskID(diskID)
|
||||
if heal {
|
||||
return saveHealingTracker(disk, diskID)
|
||||
ctx := context.Background()
|
||||
ht := newHealingTracker(disk)
|
||||
return ht.save(ctx)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user