mirror of https://github.com/milvus-io/milvus.git
add array hashKeys empty check (#15796)
fix #15791 https://github.com/milvus-io/milvus/issues/15791 Signed-off-by: zhuyaguang <zhuyaguang1368@163.com>pull/15839/head
parent
9f4c59e621
commit
27a7875a15
|
@ -788,6 +788,9 @@ func (it *insertTask) _assignSegmentID(stream msgstream.MsgStream, pack *msgstre
|
||||||
}
|
}
|
||||||
tsMsgs := pack.Msgs
|
tsMsgs := pack.Msgs
|
||||||
hashKeys := stream.ComputeProduceChannelIndexes(tsMsgs)
|
hashKeys := stream.ComputeProduceChannelIndexes(tsMsgs)
|
||||||
|
if len(hashKeys) == 0 {
|
||||||
|
return nil, fmt.Errorf("the length of hashKeys is 0")
|
||||||
|
}
|
||||||
reqID := it.Base.MsgID
|
reqID := it.Base.MsgID
|
||||||
channelCountMap := make(map[int32]uint32) // channelID to count
|
channelCountMap := make(map[int32]uint32) // channelID to count
|
||||||
channelMaxTSMap := make(map[int32]Timestamp) // channelID to max Timestamp
|
channelMaxTSMap := make(map[int32]Timestamp) // channelID to max Timestamp
|
||||||
|
|
Loading…
Reference in New Issue