heal: Fix periodic healing cleanup (#10569)

isEnded() was incorrectly calculating if the current healing sequence is
ended or not. h.currentStatus.Items could be empty if healing is very
slow and mc admin heal consumed all items.
master
Anis Elleuch 4 years ago committed by GitHub
parent 4de88e87bb
commit b302c8a5f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/admin-heal-ops.go

@ -528,7 +528,7 @@ func (h *healSequence) hasEnded() bool {
if h.clientToken == bgHealingUUID { if h.clientToken == bgHealingUUID {
return false return false
} }
return len(h.currentStatus.Items) == 0 || h.currentStatus.Summary == healStoppedStatus || h.currentStatus.Summary == healFinishedStatus return !h.endTime.IsZero()
} }
// stops the heal sequence - safe to call multiple times. // stops the heal sequence - safe to call multiple times.

Loading…
Cancel
Save