mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
refine retry on grpc (#26464)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
parent
387ad98bf1
commit
8a98a46bbb
@ -407,7 +407,7 @@ grpc:
|
||||
keepAliveTimeout: 20000
|
||||
maxMaxAttempts: 5
|
||||
initialBackOff: 1.0
|
||||
maxBackoff: 60.0
|
||||
maxBackoff: 10.0
|
||||
backoffMultiplier: 2.0
|
||||
server:
|
||||
retryTimes: 5 # retry times when receiving a grpc return value with a failure and retryable state code
|
||||
|
||||
@ -220,8 +220,8 @@ func (c *ClientBase[T]) connect(ctx context.Context) error {
|
||||
MinConnectTimeout: c.DialTimeout,
|
||||
}),
|
||||
grpc.WithPerRPCCredentials(&Token{Value: crypto.Base64Encode(util.MemberCredID)}),
|
||||
grpc.WithDisableRetry(),
|
||||
grpc.FailOnNonTempDialError(true),
|
||||
grpc.WithReturnConnectionError(),
|
||||
)
|
||||
} else {
|
||||
conn, err = grpc.DialContext(
|
||||
@ -259,8 +259,8 @@ func (c *ClientBase[T]) connect(ctx context.Context) error {
|
||||
MinConnectTimeout: c.DialTimeout,
|
||||
}),
|
||||
grpc.WithPerRPCCredentials(&Token{Value: crypto.Base64Encode(util.MemberCredID)}),
|
||||
grpc.WithDisableRetry(),
|
||||
grpc.FailOnNonTempDialError(true),
|
||||
grpc.WithReturnConnectionError(),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ const (
|
||||
// Grpc retry policy
|
||||
DefaultMaxAttempts = 5
|
||||
DefaultInitialBackoff float32 = 1.0
|
||||
DefaultMaxBackoff float32 = 60.0
|
||||
DefaultMaxBackoff float32 = 10.0
|
||||
DefaultBackoffMultiplier float32 = 2.0
|
||||
|
||||
ProxyInternalPort = 19529
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user