mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
Fix a crash bug of bulkinsert for dynamic field (#25982)
Signed-off-by: yhmo <yihua.mo@zilliz.com>
This commit is contained in:
parent
eaf53c7b39
commit
c2693ea284
@ -445,11 +445,12 @@ func fillDynamicData(blockData BlockData, collectionSchema *schemapb.CollectionS
|
||||
}
|
||||
}
|
||||
|
||||
if dynamicData.RowNum() == 0 {
|
||||
// fill the dynamic data by row count
|
||||
if dynamicData.RowNum() < rowCount {
|
||||
// fill the dynamic data by an empty JSON object, make sure the row count is eaual to other fields
|
||||
data := dynamicData.(*storage.JSONFieldData)
|
||||
bs := []byte("{}")
|
||||
for i := 0; i < rowCount; i++ {
|
||||
dynamicRowCount := dynamicData.RowNum()
|
||||
for i := 0; i < rowCount-dynamicRowCount; i++ {
|
||||
data.Data = append(data.Data, bs)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user