lighting: increase pd client retry count on error during initialization (#51706)
This commit is contained in:
@ -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)
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user