mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
fix: background heal to call HealFormat only if needed (#9491)
In large setups this avoids unnecessary data transfer across nodes and potential locks. This PR also optimizes heal result channel, which should be avoided for each queueHealTask as its expensive to create/close channels for large number of objects.
This commit is contained in:
@@ -45,6 +45,20 @@ type HealOpts struct {
|
||||
ScanMode HealScanMode `json:"scanMode"`
|
||||
}
|
||||
|
||||
// Equal returns true if no is same as o.
|
||||
func (o HealOpts) Equal(no HealOpts) bool {
|
||||
if o.Recursive != no.Recursive {
|
||||
return false
|
||||
}
|
||||
if o.DryRun != no.DryRun {
|
||||
return false
|
||||
}
|
||||
if o.Remove != no.Remove {
|
||||
return false
|
||||
}
|
||||
return o.ScanMode == no.ScanMode
|
||||
}
|
||||
|
||||
// HealStartSuccess - holds information about a successfully started
|
||||
// heal operation
|
||||
type HealStartSuccess struct {
|
||||
|
||||
Reference in New Issue
Block a user