mirror of
https://github.com/minio/minio.git
synced 2025-04-18 09:50:02 -04:00
heal: Fix passing healing opts (#9756)
Manual healing (as background healing) creates a heal task with a possiblity to override healing options, such as deep or normal mode. Use a pointer type in heal opts so nil would mean use the default healing options.
This commit is contained in:
parent
f0358acb32
commit
3aad09be28
@ -296,8 +296,8 @@ func (ahs *allHealState) PopHealStatusJSON(path string,
|
|||||||
|
|
||||||
// healSource denotes single entity and heal option.
|
// healSource denotes single entity and heal option.
|
||||||
type healSource struct {
|
type healSource struct {
|
||||||
path string // entity path (format, buckets, objects) to heal
|
path string // entity path (format, buckets, objects) to heal
|
||||||
opts madmin.HealOpts // optional heal option overrides default setting
|
opts *madmin.HealOpts // optional heal option overrides default setting
|
||||||
}
|
}
|
||||||
|
|
||||||
// healSequence - state for each heal sequence initiated on the
|
// healSequence - state for each heal sequence initiated on the
|
||||||
@ -622,8 +622,8 @@ func (h *healSequence) queueHealTask(source healSource, healType madmin.HealItem
|
|||||||
opts: h.settings,
|
opts: h.settings,
|
||||||
responseCh: h.respCh,
|
responseCh: h.respCh,
|
||||||
}
|
}
|
||||||
if !source.opts.Equal(h.settings) {
|
if source.opts != nil {
|
||||||
task.opts = source.opts
|
task.opts = *source.opts
|
||||||
}
|
}
|
||||||
globalBackgroundHealRoutine.queueHealTask(task)
|
globalBackgroundHealRoutine.queueHealTask(task)
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ func deepHealObject(objectPath string) {
|
|||||||
|
|
||||||
bgSeq.sourceCh <- healSource{
|
bgSeq.sourceCh <- healSource{
|
||||||
path: objectPath,
|
path: objectPath,
|
||||||
opts: madmin.HealOpts{ScanMode: madmin.HealDeepScan},
|
opts: &madmin.HealOpts{ScanMode: madmin.HealDeepScan},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user