mirror of
https://github.com/minio/minio.git
synced 2025-04-20 10:37:31 -04:00
avoid double MRF heal when there is versions disparity (#18585)
This commit is contained in:
parent
e98172d72d
commit
e7c144eeac
@ -1290,6 +1290,7 @@ func (er erasureObjects) CompleteMultipartUpload(ctx context.Context, bucket str
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !opts.Speedtest && !versionsDisparity {
|
||||||
// Check if there is any offline disk and add it to the MRF list
|
// Check if there is any offline disk and add it to the MRF list
|
||||||
for _, disk := range onlineDisks {
|
for _, disk := range onlineDisks {
|
||||||
if disk != nil && disk.IsOnline() {
|
if disk != nil && disk.IsOnline() {
|
||||||
@ -1298,6 +1299,7 @@ func (er erasureObjects) CompleteMultipartUpload(ctx context.Context, bucket str
|
|||||||
er.addPartial(bucket, object, fi.VersionID)
|
er.addPartial(bucket, object, fi.VersionID)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for i := 0; i < len(onlineDisks); i++ {
|
for i := 0; i < len(onlineDisks); i++ {
|
||||||
if onlineDisks[i] != nil && onlineDisks[i].IsOnline() {
|
if onlineDisks[i] != nil && onlineDisks[i].IsOnline() {
|
||||||
|
@ -1531,6 +1531,10 @@ func (er erasureObjects) putObject(ctx context.Context, bucket string, object st
|
|||||||
|
|
||||||
// For speedtest objects do not attempt to heal them.
|
// For speedtest objects do not attempt to heal them.
|
||||||
if !opts.Speedtest {
|
if !opts.Speedtest {
|
||||||
|
// When there is versions disparity we are healing
|
||||||
|
// the content implicitly for all versions, we can
|
||||||
|
// avoid triggering another MRF heal for offline drives.
|
||||||
|
if !versionsDisparity {
|
||||||
// Whether a disk was initially or becomes offline
|
// Whether a disk was initially or becomes offline
|
||||||
// during this upload, send it to the MRF list.
|
// during this upload, send it to the MRF list.
|
||||||
for i := 0; i < len(onlineDisks); i++ {
|
for i := 0; i < len(onlineDisks); i++ {
|
||||||
@ -1541,8 +1545,7 @@ func (er erasureObjects) putObject(ctx context.Context, bucket string, object st
|
|||||||
er.addPartial(bucket, object, fi.VersionID)
|
er.addPartial(bucket, object, fi.VersionID)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
if versionsDisparity {
|
|
||||||
globalMRFState.addPartialOp(partialOperation{
|
globalMRFState.addPartialOp(partialOperation{
|
||||||
bucket: bucket,
|
bucket: bucket,
|
||||||
object: object,
|
object: object,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user