From 56be6bbb3671adc85729e37746268dc5e7cb1683 Mon Sep 17 00:00:00 2001 From: Jianjun Liao <36503113+Leavrth@users.noreply.github.com> Date: Fri, 11 Oct 2024 15:55:31 +0800 Subject: [PATCH] br: avoid wrong warning (#56492) close pingcap/tidb#55902 --- br/pkg/utils/safe_point.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/pkg/utils/safe_point.go b/br/pkg/utils/safe_point.go index 5c06961d69ed9..bd381a5ebbe91 100644 --- a/br/pkg/utils/safe_point.go +++ b/br/pkg/utils/safe_point.go @@ -84,7 +84,7 @@ func UpdateServiceSafePoint(ctx context.Context, pdClient pd.Client, sp BRServic log.Debug("update PD safePoint limit with TTL", zap.Object("safePoint", sp)) lastSafePoint, err := pdClient.UpdateServiceGCSafePoint(ctx, sp.ID, sp.TTL, sp.BackupTS-1) - if lastSafePoint > sp.BackupTS-1 { + if lastSafePoint > sp.BackupTS-1 && sp.TTL > 0 { log.Warn("service GC safe point lost, we may fail to back up if GC lifetime isn't long enough", zap.Uint64("lastSafePoint", lastSafePoint), zap.Object("safePoint", sp),