From 79594875db3a552f632e4b90f72df6fc808a95d9 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Thu, 12 Dec 2024 16:28:27 +0800 Subject: [PATCH] br: avoid wrong warning (#56492) (#57985) 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 93fa9415aa369..93491425e6a27 100644 --- a/br/pkg/utils/safe_point.go +++ b/br/pkg/utils/safe_point.go @@ -85,7 +85,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),