From b302c8a5f48b37976c298743f9789c2c1b1da169 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Fri, 25 Sep 2020 18:29:00 +0100 Subject: [PATCH] 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. --- cmd/admin-heal-ops.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/admin-heal-ops.go b/cmd/admin-heal-ops.go index 4f915887f..a54fae9a8 100644 --- a/cmd/admin-heal-ops.go +++ b/cmd/admin-heal-ops.go @@ -528,7 +528,7 @@ func (h *healSequence) hasEnded() bool { if h.clientToken == bgHealingUUID { 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.