mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
fix: empty internal InsertMsg caues panic[2.6] (#44906)
issue: https://github.com/milvus-io/milvus/issues/44901 pr: https://github.com/milvus-io/milvus/pull/44903 Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
This commit is contained in:
parent
2b5c2f7303
commit
cfd748f50d
@ -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