2020-11-26 16:01:31 +08:00
|
|
|
package querynode
|
2020-11-02 19:30:12 +08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/zilliztech/milvus-distributed/internal/msgstream"
|
|
|
|
"github.com/zilliztech/milvus-distributed/internal/util/flowgraph"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Msg = flowgraph.Msg
|
2020-11-09 16:27:11 +08:00
|
|
|
type MsgStreamMsg = flowgraph.MsgStreamMsg
|
2020-11-02 19:30:12 +08:00
|
|
|
|
|
|
|
type key2SegMsg struct {
|
2020-11-17 14:10:07 +08:00
|
|
|
tsMessages []msgstream.TsMsg
|
2020-11-02 19:30:12 +08:00
|
|
|
timeRange TimeRange
|
|
|
|
}
|
|
|
|
|
2020-12-10 16:31:09 +08:00
|
|
|
type ddMsg struct {
|
|
|
|
collectionRecords map[string][]metaOperateRecord
|
|
|
|
partitionRecords map[string][]metaOperateRecord
|
|
|
|
timeRange TimeRange
|
2020-11-02 19:30:12 +08:00
|
|
|
}
|
|
|
|
|
2020-11-09 16:27:11 +08:00
|
|
|
type insertMsg struct {
|
2020-11-05 18:01:33 +08:00
|
|
|
insertMessages []*msgstream.InsertMsg
|
2020-11-12 12:04:12 +08:00
|
|
|
timeRange TimeRange
|
2020-11-02 19:30:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type deleteMsg struct {
|
2020-11-09 16:27:11 +08:00
|
|
|
deleteMessages []*msgstream.DeleteMsg
|
2020-11-12 12:04:12 +08:00
|
|
|
timeRange TimeRange
|
2020-11-02 19:30:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type serviceTimeMsg struct {
|
2020-11-03 14:53:36 +08:00
|
|
|
timeRange TimeRange
|
2020-11-02 19:30:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteData struct {
|
2020-11-04 17:58:43 +08:00
|
|
|
deleteIDs map[UniqueID][]UniqueID
|
|
|
|
deleteTimestamps map[UniqueID][]Timestamp
|
|
|
|
deleteOffset map[UniqueID]int64
|
2020-11-02 19:30:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteRecord struct {
|
2020-11-04 17:58:43 +08:00
|
|
|
entityID UniqueID
|
|
|
|
timestamp Timestamp
|
|
|
|
segmentID UniqueID
|
2020-11-02 19:30:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type DeletePreprocessData struct {
|
|
|
|
deleteRecords []*DeleteRecord
|
|
|
|
count int32
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ksMsg *key2SegMsg) TimeTick() Timestamp {
|
|
|
|
return ksMsg.timeRange.timestampMax
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ksMsg *key2SegMsg) DownStreamNodeIdx() int {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2020-12-10 16:31:09 +08:00
|
|
|
func (suMsg *ddMsg) TimeTick() Timestamp {
|
2020-11-02 19:30:12 +08:00
|
|
|
return suMsg.timeRange.timestampMax
|
|
|
|
}
|
|
|
|
|
2020-12-10 16:31:09 +08:00
|
|
|
func (suMsg *ddMsg) DownStreamNodeIdx() int {
|
2020-11-02 19:30:12 +08:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (iMsg *insertMsg) TimeTick() Timestamp {
|
|
|
|
return iMsg.timeRange.timestampMax
|
|
|
|
}
|
|
|
|
|
|
|
|
func (iMsg *insertMsg) DownStreamNodeIdx() int {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (dMsg *deleteMsg) TimeTick() Timestamp {
|
|
|
|
return dMsg.timeRange.timestampMax
|
|
|
|
}
|
|
|
|
|
|
|
|
func (dMsg *deleteMsg) DownStreamNodeIdx() int {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (stMsg *serviceTimeMsg) TimeTick() Timestamp {
|
|
|
|
return stMsg.timeRange.timestampMax
|
|
|
|
}
|
|
|
|
|
|
|
|
func (stMsg *serviceTimeMsg) DownStreamNodeIdx() int {
|
|
|
|
return 0
|
|
|
|
}
|