mirror of https://github.com/milvus-io/milvus.git
parent
be5c492e5a
commit
bf2c427609
|
@ -15,6 +15,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
|
||||
|
@ -90,7 +91,9 @@ func (c *Client) connect(retryOptions ...retry.Option) error {
|
|||
}
|
||||
opts := trace.GetInterceptorOpts()
|
||||
log.Debug("DataCoordClient try reconnect ", zap.String("address", c.addr))
|
||||
conn, err := grpc.DialContext(c.ctx, c.addr,
|
||||
ctx, cancel := context.WithTimeout(c.ctx, 15*time.Second)
|
||||
defer cancel()
|
||||
conn, err := grpc.DialContext(ctx, c.addr,
|
||||
grpc.WithInsecure(), grpc.WithBlock(),
|
||||
grpc.WithDefaultCallOptions(
|
||||
grpc.MaxCallRecvMsgSize(Params.ClientMaxRecvSize),
|
||||
|
|
|
@ -15,6 +15,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/log"
|
||||
"github.com/milvus-io/milvus/internal/util/retry"
|
||||
|
@ -68,7 +69,9 @@ func (c *Client) connect(retryOptions ...retry.Option) error {
|
|||
connectGrpcFunc := func() error {
|
||||
opts := trace.GetInterceptorOpts()
|
||||
log.Debug("DataNode connect ", zap.String("address", c.addr))
|
||||
conn, err := grpc.DialContext(c.ctx, c.addr,
|
||||
ctx, cancel := context.WithTimeout(c.ctx, 15*time.Second)
|
||||
defer cancel()
|
||||
conn, err := grpc.DialContext(ctx, c.addr,
|
||||
grpc.WithInsecure(), grpc.WithBlock(),
|
||||
grpc.WithDefaultCallOptions(
|
||||
grpc.MaxCallRecvMsgSize(Params.ClientMaxRecvSize),
|
||||
|
|
|
@ -15,6 +15,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
|
@ -91,7 +92,9 @@ func (c *Client) connect(retryOptions ...retry.Option) error {
|
|||
}
|
||||
opts := trace.GetInterceptorOpts()
|
||||
log.Debug("IndexCoordClient try connect ", zap.String("address", c.addr))
|
||||
conn, err := grpc.DialContext(c.ctx, c.addr,
|
||||
ctx, cancel := context.WithTimeout(c.ctx, 15*time.Second)
|
||||
defer cancel()
|
||||
conn, err := grpc.DialContext(ctx, c.addr,
|
||||
grpc.WithInsecure(), grpc.WithBlock(),
|
||||
grpc.WithDefaultCallOptions(
|
||||
grpc.MaxCallRecvMsgSize(Params.ClientMaxRecvSize),
|
||||
|
|
|
@ -15,6 +15,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
|
||||
|
@ -64,7 +65,9 @@ func (c *Client) connect(retryOptions ...retry.Option) error {
|
|||
connectGrpcFunc := func() error {
|
||||
opts := trace.GetInterceptorOpts()
|
||||
log.Debug("IndexNodeClient try connect ", zap.String("address", c.addr))
|
||||
conn, err := grpc.DialContext(c.ctx, c.addr,
|
||||
ctx, cancel := context.WithTimeout(c.ctx, 15*time.Second)
|
||||
defer cancel()
|
||||
conn, err := grpc.DialContext(ctx, c.addr,
|
||||
grpc.WithInsecure(), grpc.WithBlock(),
|
||||
grpc.WithDefaultCallOptions(
|
||||
grpc.MaxCallRecvMsgSize(Params.ClientMaxRecvSize),
|
||||
|
|
|
@ -15,6 +15,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
|
||||
|
@ -63,7 +64,9 @@ func (c *Client) connect(retryOptions ...retry.Option) error {
|
|||
connectGrpcFunc := func() error {
|
||||
opts := trace.GetInterceptorOpts()
|
||||
log.Debug("ProxyClient try connect ", zap.String("address", c.addr))
|
||||
conn, err := grpc.DialContext(c.ctx, c.addr,
|
||||
ctx, cancel := context.WithTimeout(c.ctx, 15*time.Second)
|
||||
defer cancel()
|
||||
conn, err := grpc.DialContext(ctx, c.addr,
|
||||
grpc.WithInsecure(), grpc.WithBlock(),
|
||||
grpc.WithDefaultCallOptions(
|
||||
grpc.MaxCallRecvMsgSize(Params.ClientMaxRecvSize),
|
||||
|
|
|
@ -15,6 +15,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
|
||||
|
@ -91,7 +92,9 @@ func (c *Client) connect(retryOptions ...retry.Option) error {
|
|||
}
|
||||
opts := trace.GetInterceptorOpts()
|
||||
log.Debug("QueryCoordClient try reconnect ", zap.String("address", c.addr))
|
||||
conn, err := grpc.DialContext(c.ctx, c.addr,
|
||||
ctx, cancel := context.WithTimeout(c.ctx, 15*time.Second)
|
||||
defer cancel()
|
||||
conn, err := grpc.DialContext(ctx, c.addr,
|
||||
grpc.WithInsecure(), grpc.WithBlock(),
|
||||
grpc.WithDefaultCallOptions(
|
||||
grpc.MaxCallRecvMsgSize(Params.ClientMaxRecvSize),
|
||||
|
|
|
@ -15,6 +15,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
|
@ -64,7 +65,9 @@ func (c *Client) connect(retryOptions ...retry.Option) error {
|
|||
connectGrpcFunc := func() error {
|
||||
opts := trace.GetInterceptorOpts()
|
||||
log.Debug("QueryNodeClient try connect ", zap.String("address", c.addr))
|
||||
conn, err := grpc.DialContext(c.ctx, c.addr,
|
||||
ctx, cancel := context.WithTimeout(c.ctx, 15*time.Second)
|
||||
defer cancel()
|
||||
conn, err := grpc.DialContext(ctx, c.addr,
|
||||
grpc.WithInsecure(), grpc.WithBlock(),
|
||||
grpc.WithDefaultCallOptions(
|
||||
grpc.MaxCallRecvMsgSize(Params.ClientMaxRecvSize),
|
||||
|
|
|
@ -15,6 +15,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
|
||||
|
@ -99,7 +100,9 @@ func (c *GrpcClient) connect(retryOptions ...retry.Option) error {
|
|||
}
|
||||
opts := trace.GetInterceptorOpts()
|
||||
log.Debug("RootCoordClient try reconnect ", zap.String("address", c.addr))
|
||||
conn, err := grpc.DialContext(c.ctx, c.addr,
|
||||
ctx, cancel := context.WithTimeout(c.ctx, 15*time.Second)
|
||||
defer cancel()
|
||||
conn, err := grpc.DialContext(ctx, c.addr,
|
||||
grpc.WithInsecure(), grpc.WithBlock(),
|
||||
grpc.WithDefaultCallOptions(
|
||||
grpc.MaxCallRecvMsgSize(Params.ClientMaxRecvSize),
|
||||
|
|
Loading…
Reference in New Issue