From 220388f1226becb6b666226e4a637579c0cc59dc Mon Sep 17 00:00:00 2001 From: fengou1 Date: Wed, 15 Feb 2023 14:25:47 +0800 Subject: [PATCH] fix: cherry pick conflict --- br/pkg/restore/data.go | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/br/pkg/restore/data.go b/br/pkg/restore/data.go index 4cf93d6c03d82..351798dbaa7ab 100644 --- a/br/pkg/restore/data.go +++ b/br/pkg/restore/data.go @@ -305,29 +305,6 @@ func (recovery *Recovery) WaitApply(ctx context.Context) (err error) { // prepare the region for flashback the data, the purpose is to stop region service, put region in flashback state func (recovery *Recovery) PrepareFlashbackToVersion(ctx context.Context, resolveTS uint64, startTS uint64) (err error) { -<<<<<<< HEAD - var totalRegions atomic.Uint64 - totalRegions.Store(0) - - handler := func(ctx context.Context, r tikvstore.KeyRange) (rangetask.TaskStat, error) { - stats, err := ddl.SendPrepareFlashbackToVersionRPC(ctx, recovery.mgr.GetStorage().(tikv.Storage), resolveTS, startTS, r) - totalRegions.Add(uint64(stats.CompletedRegions)) - return stats, err - } - - runner := rangetask.NewRangeTaskRunner("br-flashback-prepare-runner", recovery.mgr.GetStorage().(tikv.Storage), int(recovery.concurrency), handler) - // Run prepare flashback on the entire TiKV cluster. Empty keys means the range is unbounded. - err = runner.RunOnRange(ctx, []byte(""), []byte("")) - if err != nil { - log.Error("region flashback prepare get error") - return errors.Trace(err) - } - - recovery.totalFlashbackRegions = totalRegions.Load() - log.Info("region flashback prepare complete", zap.Int("regions", runner.CompletedRegions())) - - return nil -======= retryErr := utils.WithRetry( ctx, func() error { @@ -351,7 +328,6 @@ func (recovery *Recovery) PrepareFlashbackToVersion(ctx context.Context, resolve recovery.progress.Inc() return retryErr ->>>>>>> 3b66b540058 (br: add retry for prepare flashback for backup cluster is empty and there are only one region (#41059)) } // flashback the region data to version resolveTS