Fix querycoord panic when upgrade querychannelInfo (#10681)

Signed-off-by: xige-16 <xi.ge@zilliz.com>
pull/10693/head
xige-16 2021-10-26 20:25:05 +08:00 committed by GitHub
parent 656f9380b1
commit dc9b37128f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -410,6 +410,13 @@ func (m *MetaReplica) saveGlobalSealedSegInfos(saves col2SegmentInfos) (col2Seal
if !ok || len(messageIDs) == 0 {
return col2SegmentChangeInfos, errors.New("updateGlobalSealedSegmentInfos: send sealed segment change info failed")
}
if queryChannelInfo.SeekPosition == nil {
queryChannelInfo.SeekPosition = &internalpb.MsgPosition{
ChannelName: queryChannelInfo.QueryChannelID,
}
}
queryChannelInfo.SeekPosition.MsgID = messageIDs[0].Serialize()
// update segmentInfo, queryChannelInfo meta to cache and etcd
@ -522,6 +529,12 @@ func (m *MetaReplica) removeGlobalSealedSegInfos(collectionID UniqueID, partitio
if !ok || len(messageIDs) == 0 {
return col2SealedSegmentChangeInfos{collectionID: segmentChangeInfos}, errors.New("updateGlobalSealedSegmentInfos: send sealed segment change info failed")
}
if queryChannelInfo.SeekPosition == nil {
queryChannelInfo.SeekPosition = &internalpb.MsgPosition{
ChannelName: queryChannelInfo.QueryChannelID,
}
}
queryChannelInfo.SeekPosition.MsgID = messageIDs[0].Serialize()
// update segmentInfo, queryChannelInfo meta to cache and etcd