mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 17:48:29 +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 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)
|
repackedMsgs = append(repackedMsgs, msg)
|
||||||
msg = createInsertMsg(segmentID, channelName)
|
msg = createInsertMsg(segmentID, channelName)
|
||||||
requestSize = 0
|
requestSize = 0
|
||||||
@ -88,7 +88,9 @@ func genInsertMsgsByPartition(ctx context.Context,
|
|||||||
msg.NumRows++
|
msg.NumRows++
|
||||||
requestSize += curRowMessageSize
|
requestSize += curRowMessageSize
|
||||||
}
|
}
|
||||||
|
if msg.NumRows > 0 {
|
||||||
repackedMsgs = append(repackedMsgs, msg)
|
repackedMsgs = append(repackedMsgs, msg)
|
||||||
|
}
|
||||||
|
|
||||||
return repackedMsgs, nil
|
return repackedMsgs, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user