diff --git a/br/pkg/lightning/backend/local/local.go b/br/pkg/lightning/backend/local/local.go index 9a53d47d93..ea2e08a55a 100644 --- a/br/pkg/lightning/backend/local/local.go +++ b/br/pkg/lightning/backend/local/local.go @@ -517,7 +517,6 @@ func NewBackend( // If the time too short, we may scatter a region many times, because // the interface `ScatterRegions` may time out. pd.WithCustomTimeoutOption(60*time.Second), - pd.WithMaxErrorRetry(3), ) if err != nil { return nil, common.NormalizeOrWrapErr(common.ErrCreatePDClient, err) diff --git a/br/pkg/pdutil/pd.go b/br/pkg/pdutil/pd.go index 16e484b449..d110abbc49 100644 --- a/br/pkg/pdutil/pd.go +++ b/br/pkg/pdutil/pd.go @@ -159,7 +159,6 @@ func NewPdController( // If the time too short, we may scatter a region many times, because // the interface `ScatterRegions` may time out. pd.WithCustomTimeoutOption(60*time.Second), - pd.WithMaxErrorRetry(3), ) if err != nil { log.Error("fail to create pd client", zap.Error(err)) diff --git a/br/pkg/restore/rawkv_client.go b/br/pkg/restore/rawkv_client.go index 0b897a3ebc..22f0a9a86d 100644 --- a/br/pkg/restore/rawkv_client.go +++ b/br/pkg/restore/rawkv_client.go @@ -28,8 +28,7 @@ func NewRawkvClient(ctx context.Context, pdAddrs []string, security config.Secur ctx, pdAddrs, security, - pd.WithCustomTimeoutOption(10*time.Second), - pd.WithMaxErrorRetry(5)) + pd.WithCustomTimeoutOption(10*time.Second)) } type KVPair struct {