mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 20:39:36 +08:00
Cherry-pick from master pr: #33248 When InsertData is too large for cpp proto unmarshalling, the error message is confusing since the length is overflowed This PR adds assertion for insert data length. Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
64d0a71ba0
commit
3c31499bbc
@ -12,6 +12,7 @@
|
||||
#include "segcore/segment_c.h"
|
||||
|
||||
#include <memory>
|
||||
#include <limits>
|
||||
|
||||
#include "common/FieldData.h"
|
||||
#include "common/LoadInfo.h"
|
||||
@ -239,6 +240,9 @@ Insert(CSegmentInterface c_segment,
|
||||
const uint8_t* data_info,
|
||||
const uint64_t data_info_len) {
|
||||
try {
|
||||
AssertInfo(data_info_len < std::numeric_limits<int>::max(),
|
||||
"insert data length ({}) exceeds max int",
|
||||
data_info_len);
|
||||
auto segment = static_cast<milvus::segcore::SegmentGrowing*>(c_segment);
|
||||
auto insert_record_proto =
|
||||
std::make_unique<milvus::InsertRecordProto>();
|
||||
|
Loading…
Reference in New Issue
Block a user