From c4357ee0ef1088d0eea8ec771e7a85ec60dab3b8 Mon Sep 17 00:00:00 2001 From: 5kbpers Date: Tue, 3 Mar 2020 16:00:45 +0800 Subject: [PATCH] backup: check safepoint for last backup ts Signed-off-by: 5kbpers --- pkg/backup/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/backup/client.go b/pkg/backup/client.go index 6d6eff033..f0ef0e731 100644 --- a/pkg/backup/client.go +++ b/pkg/backup/client.go @@ -334,6 +334,11 @@ func (bc *Client) BackupRanges( log.Error("check GC safepoint failed", zap.Error(err)) return err } + err = CheckGCSafepoint(ctx, bc.mgr.GetPDClient(), lastBackupTS) + if err != nil { + log.Error("Check gc safepoint for last backup ts failed", zap.Error(err)) + return err + } if finished { // Return error (if there is any) before finishing backup. return err