lighting: increase pd client retry count on error during initialization (#51706)

This commit is contained in:
tangenta
2024-03-14 02:05:10 +08:00
committed by GitHub
parent 834fd160c3
commit fa9f84e51a
3 changed files with 1 additions and 4 deletions

View File

@ -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)

View File

@ -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))

View File

@ -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 {