mirror of
https://github.com/minio/minio.git
synced 2026-11-25 23:23:49 +00:00
add crash protection from backend modifications (#16846)
This commit is contained in:
1 parent
3b5dbf9046
commit
6c11dbffd5
6 files changed
+61
-29
No files matched your search
@@ -658,6 +658,13 @@ func (er erasureObjects) getObjectFileInfo(ctx context.Context, bucket, object s
|
||||
return fi, nil, nil, err
|
||||
}
|
||||
|
||||
if !fi.Deleted && len(fi.Erasure.Distribution) != len(onlineDisks) {
|
||||
err := fmt.Errorf("unexpected file distribution (%v) from online disks (%v), looks like backend disks have been manually modified refusing to heal %s/%s(%s)",
|
||||
fi.Erasure.Distribution, onlineDisks, bucket, object, opts.VersionID)
|
||||
logger.LogIf(ctx, err)
|
||||
return fi, nil, nil, toObjectErr(err, bucket, object, opts.VersionID)
|
||||
}
|
||||
|
||||
filterOnlineDisksInplace(fi, metaArr, onlineDisks)
|
||||
|
||||
// if one of the disk is offline, return right here no need
|
||||
|
||||
Reference in new issue
Block a user