fix: streaming node consume blocks if recv message is too large (#36151)

issue: #36081

Signed-off-by: chyezh <chyezh@outlook.com>
This commit is contained in:
Zhen Ye 2024-09-13 16:41:08 +08:00 committed by GitHub
parent 2e434b2358
commit c03eb6f664
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,6 +3,7 @@ package consumer
import ( import (
"context" "context"
"io" "io"
"math"
"github.com/cockroachdb/errors" "github.com/cockroachdb/errors"
"go.uber.org/zap" "go.uber.org/zap"
@ -45,7 +46,9 @@ func CreateConsumer(
} }
// TODO: configurable or auto adjust grpc.MaxCallRecvMsgSize // TODO: configurable or auto adjust grpc.MaxCallRecvMsgSize
streamClient, err := handlerClient.Consume(ctx, grpc.MaxCallRecvMsgSize(8388608)) // The messages are always managed by milvus cluster, so the size of message shouldn't be controlled here
// to avoid infinitely blocks.
streamClient, err := handlerClient.Consume(ctx, grpc.MaxCallRecvMsgSize(math.MaxInt32))
if err != nil { if err != nil {
return nil, err return nil, err
} }