mirror of
https://github.com/minio/minio.git
synced 2025-11-25 20:16:10 -05:00
Heal recursively all entries in config/ prefix (#6545)
This to ensure that we heal all entries in config/ prefix, we will have IAM and STS related files which are being introduced in #6168 PR This is a change to ensure that we heal all of them properly, not just `config.json`
This commit is contained in:
committed by
Nitish Tiwari
parent
839a758a36
commit
b4772849f9
@@ -205,6 +205,10 @@ func healBucketMetadata(xl xlObjects, bucket string, dryRun bool) (
|
||||
reqInfo := &logger.ReqInfo{BucketName: bucket}
|
||||
ctx := logger.SetReqInfo(context.Background(), reqInfo)
|
||||
result, healErr := xl.HealObject(ctx, minioMetaBucket, metaPath, dryRun)
|
||||
// If object is not found, skip the file.
|
||||
if isErrObjectNotFound(healErr) {
|
||||
return nil
|
||||
}
|
||||
if healErr != nil {
|
||||
return healErr
|
||||
}
|
||||
@@ -604,13 +608,6 @@ func (xl xlObjects) healObjectDir(ctx context.Context, bucket, object string, dr
|
||||
// and later the disk comes back up again, heal on the object
|
||||
// should delete it.
|
||||
func (xl xlObjects) HealObject(ctx context.Context, bucket, object string, dryRun bool) (hr madmin.HealResultItem, err error) {
|
||||
defer func() {
|
||||
// If object is not found, ignore the error.
|
||||
if isErrObjectNotFound(err) {
|
||||
err = nil
|
||||
}
|
||||
}()
|
||||
|
||||
// Create context that also contains information about the object and bucket.
|
||||
// The top level handler might not have this information.
|
||||
reqInfo := logger.GetReqInfo(ctx)
|
||||
|
||||
Reference in New Issue
Block a user