mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
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:
parent
2e434b2358
commit
c03eb6f664
@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user