Fix dd node filter bug (#5736)

Signed-off-by: sunby <bingyi.sun@zilliz.com>
pull/5779/head
sunby 2021-06-11 11:37:24 +08:00 committed by zhenshan.cao
parent 33a43f48c8
commit 8a0335be44
1 changed files with 2 additions and 3 deletions

View File

@ -90,7 +90,6 @@ func (ddn *ddNode) Operate(in []flowgraph.Msg) []flowgraph.Msg {
continue continue
} }
} }
iMsg.insertMessages = append(iMsg.insertMessages, msg.(*msgstream.InsertMsg)) iMsg.insertMessages = append(iMsg.insertMessages, msg.(*msgstream.InsertMsg))
} }
} }
@ -110,10 +109,10 @@ func (ddn *ddNode) filterFlushedSegmentInsertMessages(msg *msgstream.InsertMsg)
ddn.mu.Lock() ddn.mu.Lock()
if si, ok := ddn.seg2SegInfo[msg.GetSegmentID()]; ok { if si, ok := ddn.seg2SegInfo[msg.GetSegmentID()]; ok {
if msg.EndTs() > si.GetDmlPosition().GetTimestamp() { if msg.EndTs() <= si.GetDmlPosition().GetTimestamp() {
delete(ddn.seg2SegInfo, msg.GetSegmentID())
return true return true
} }
delete(ddn.seg2SegInfo, msg.GetSegmentID())
} }
ddn.mu.Unlock() ddn.mu.Unlock()