Add channel name check before querynode seek (#14169)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2021-12-24 15:38:17 +08:00 committed by GitHub
parent 7a4de9897d
commit c62457a6ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -427,7 +427,12 @@ func (w *watchDmChannelsTask) Execute(ctx context.Context) error {
}
pos.MsgGroup = consumeSubName
// use pChannel to seek
pos.ChannelName = VPChannels[fg.channel]
pChannel, ok := VPChannels[fg.channel]
if pChannel == "" || !ok {
log.Error("watch dm channel task found unmatched channel name", zap.Any("position", pos), zap.String("fg channel", fg.channel), zap.String("pchannel", pChannel))
return errors.New("empty pchannel found")
}
pos.ChannelName = pChannel
err = fg.seekQueryNodeFlowGraph(pos)
if err != nil {
return errors.New("msgStream seek error :" + err.Error())