mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 11:59:00 +08:00
fix: increase expr recursion depth to avoid parse failed (#29860)
#29759 Signed-off-by: luzhang <luzhang@zilliz.com> Co-authored-by: luzhang <luzhang@zilliz.com>
This commit is contained in:
parent
031243fee7
commit
5164d30287
@ -77,7 +77,15 @@ CreateRetrievePlanByExpr(const Schema& schema,
|
||||
const void* serialized_expr_plan,
|
||||
const int64_t size) {
|
||||
proto::plan::PlanNode plan_node;
|
||||
plan_node.ParseFromArray(serialized_expr_plan, size);
|
||||
google::protobuf::io::ArrayInputStream array_stream(serialized_expr_plan,
|
||||
size);
|
||||
google::protobuf::io::CodedInputStream input_stream(&array_stream);
|
||||
input_stream.SetRecursionLimit(std::numeric_limits<int32_t>::max());
|
||||
|
||||
auto res = plan_node.ParsePartialFromCodedStream(&input_stream);
|
||||
if (!res) {
|
||||
throw SegcoreError(UnexpectedError, "parse plan node proto failed");
|
||||
}
|
||||
return ProtoParser(schema).CreateRetrievePlan(plan_node);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user