From 5d4a11dad2d5589fcf9c44113df2b1af002b938f Mon Sep 17 00:00:00 2001 From: yuyi Date: Thu, 22 Feb 2024 15:23:41 +0800 Subject: [PATCH] fix(dashboard): convert crontab to scheduleDates, every-day incr backup to empty array --- .../dashboard/internal/business/oceanbase/obtenantbackup.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/distribution/dashboard/internal/business/oceanbase/obtenantbackup.go b/distribution/dashboard/internal/business/oceanbase/obtenantbackup.go index 1b78f1592..2f31de9b9 100644 --- a/distribution/dashboard/internal/business/oceanbase/obtenantbackup.go +++ b/distribution/dashboard/internal/business/oceanbase/obtenantbackup.go @@ -110,6 +110,10 @@ func getScheduleDatesFromPolicy(p *v1alpha1.OBTenantBackupPolicy) param.Schedule var i, j int for i < len(fullDays) && j < len(incrementalDays) { fullDay, _ := strconv.Atoi(fullDays[i]) + if incrementalDays[j] == "*" { + j = len(incrementalDays) + break + } incrementalDay, _ := strconv.Atoi(incrementalDays[j]) // It should not happen, but just in case if fullDay == incrementalDay {