mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
fix: empty internal InsertMsg caues panic (#44903)
fix: https://github.com/milvus-io/milvus/issues/44901 Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
This commit is contained in:
parent
6c8e353439
commit
9c2aeaa258
@ -75,7 +75,7 @@ func genInsertMsgsByPartition(ctx context.Context,
|
||||
}
|
||||
|
||||
// if insertMsg's size is greater than the threshold, split into multiple insertMsgs
|
||||
if requestSize+curRowMessageSize >= threshold {
|
||||
if requestSize+curRowMessageSize >= threshold && msg.NumRows > 0 {
|
||||
repackedMsgs = append(repackedMsgs, msg)
|
||||
msg = createInsertMsg(segmentID, channelName)
|
||||
requestSize = 0
|
||||
@ -88,7 +88,9 @@ func genInsertMsgsByPartition(ctx context.Context,
|
||||
msg.NumRows++
|
||||
requestSize += curRowMessageSize
|
||||
}
|
||||
repackedMsgs = append(repackedMsgs, msg)
|
||||
if msg.NumRows > 0 {
|
||||
repackedMsgs = append(repackedMsgs, msg)
|
||||
}
|
||||
|
||||
return repackedMsgs, nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user