mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
Remove dependency for dropped segment checkpoint in querynode (#19831)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com> Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
9d43947f1c
commit
a3f84f2ea3
@ -20,6 +20,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math"
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
@ -319,18 +320,20 @@ func (w *watchDmChannelsTask) Execute(ctx context.Context) (err error) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// add excluded segments for dropped segments,
|
// add excluded segments for dropped segments,
|
||||||
// dropped segments with later check point than seekPosition should be filtered out.
|
// exclude all msgs with dropped segment id
|
||||||
droppedCheckPointInfos := make([]*datapb.SegmentInfo, 0)
|
// DO NOT refer to dropped segment info, see issue https://github.com/milvus-io/milvus/issues/19704
|
||||||
|
var droppedCheckPointInfos []*datapb.SegmentInfo
|
||||||
for _, info := range w.req.Infos {
|
for _, info := range w.req.Infos {
|
||||||
for _, droppedSegmentID := range info.GetDroppedSegmentIds() {
|
for _, droppedSegmentID := range info.GetDroppedSegmentIds() {
|
||||||
droppedSegment := w.req.SegmentInfos[droppedSegmentID]
|
droppedCheckPointInfos = append(droppedCheckPointInfos, &datapb.SegmentInfo{
|
||||||
for _, position := range channel2SeekPosition {
|
ID: droppedSegmentID,
|
||||||
if droppedSegment != nil &&
|
CollectionID: collectionID,
|
||||||
droppedSegment.DmlPosition.ChannelName == position.ChannelName &&
|
InsertChannel: info.GetChannelName(),
|
||||||
droppedSegment.DmlPosition.Timestamp > position.Timestamp {
|
DmlPosition: &internalpb.MsgPosition{
|
||||||
droppedCheckPointInfos = append(droppedCheckPointInfos, droppedSegment)
|
ChannelName: info.GetChannelName(),
|
||||||
}
|
Timestamp: math.MaxUint64,
|
||||||
}
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
w.node.metaReplica.addExcludedSegments(collectionID, droppedCheckPointInfos)
|
w.node.metaReplica.addExcludedSegments(collectionID, droppedCheckPointInfos)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user