mirror of
https://github.com/minio/minio.git
synced 2025-11-27 04:46:53 -05:00
admin/heal: Fix deep healing to heal objects under more conditions (#8321)
- Heal if the part.1 is truncated from its original size - Heal if the part.1 fails while being verified in between - Heal if the part.1 fails while being at a certain offset Other cleanups include make sure to flush the HTTP responses properly from storage-rest-server, avoid using 'defer' to improve call latency. 'defer' incurs latency avoid them in our hot-paths such as storage-rest handlers. Fixes #8319
This commit is contained in:
committed by
kannappanr
parent
61927d228c
commit
ff5bf51952
@@ -191,17 +191,14 @@ func shouldHealObjectOnDisk(xlErr, dataErr error, meta xlMetaV1, quorumModTime t
|
||||
return true
|
||||
}
|
||||
if xlErr == nil {
|
||||
// If xl.json was read fine but there is some problem with the part.N files.
|
||||
if dataErr == errFileNotFound {
|
||||
// If xl.json was read fine but there may be problem with the part.N files.
|
||||
if IsErr(dataErr, []error{
|
||||
errFileNotFound,
|
||||
errFileCorrupt,
|
||||
}...) {
|
||||
return true
|
||||
}
|
||||
if dataErr == errFileUnexpectedSize {
|
||||
return true
|
||||
}
|
||||
if _, ok := dataErr.(HashMismatchError); ok {
|
||||
return true
|
||||
}
|
||||
if quorumModTime != meta.Stat.ModTime {
|
||||
if !quorumModTime.Equal(meta.Stat.ModTime) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user