mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 04:49:08 +08:00
f12a0490bb
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
101 lines
2.0 KiB
Go
101 lines
2.0 KiB
Go
package querynode
|
|
|
|
import (
|
|
"github.com/zilliztech/milvus-distributed/internal/msgstream"
|
|
"github.com/zilliztech/milvus-distributed/internal/util/flowgraph"
|
|
)
|
|
|
|
type Msg = flowgraph.Msg
|
|
type MsgStreamMsg = flowgraph.MsgStreamMsg
|
|
|
|
type key2SegMsg struct {
|
|
tsMessages []msgstream.TsMsg
|
|
timeRange TimeRange
|
|
}
|
|
|
|
type ddMsg struct {
|
|
collectionRecords map[UniqueID][]metaOperateRecord
|
|
partitionRecords map[UniqueID][]metaOperateRecord
|
|
gcRecord *gcRecord
|
|
timeRange TimeRange
|
|
}
|
|
|
|
type metaOperateRecord struct {
|
|
createOrDrop bool // create: true, drop: false
|
|
timestamp Timestamp
|
|
}
|
|
|
|
type insertMsg struct {
|
|
insertMessages []*msgstream.InsertMsg
|
|
gcRecord *gcRecord
|
|
timeRange TimeRange
|
|
}
|
|
|
|
type deleteMsg struct {
|
|
deleteMessages []*msgstream.DeleteMsg
|
|
timeRange TimeRange
|
|
}
|
|
|
|
type serviceTimeMsg struct {
|
|
gcRecord *gcRecord
|
|
timeRange TimeRange
|
|
}
|
|
|
|
type gcMsg struct {
|
|
gcRecord *gcRecord
|
|
timeRange TimeRange
|
|
}
|
|
|
|
type DeleteData struct {
|
|
deleteIDs map[UniqueID][]UniqueID
|
|
deleteTimestamps map[UniqueID][]Timestamp
|
|
deleteOffset map[UniqueID]int64
|
|
}
|
|
|
|
type DeleteRecord struct {
|
|
entityID UniqueID
|
|
timestamp Timestamp
|
|
segmentID UniqueID
|
|
}
|
|
|
|
type DeletePreprocessData struct {
|
|
deleteRecords []*DeleteRecord
|
|
count int32
|
|
}
|
|
|
|
// TODO: delete collection id
|
|
type partitionWithID struct {
|
|
partitionID UniqueID
|
|
collectionID UniqueID
|
|
}
|
|
|
|
type gcRecord struct {
|
|
// collections and partitions to be dropped
|
|
collections []UniqueID
|
|
partitions []partitionWithID
|
|
}
|
|
|
|
func (ksMsg *key2SegMsg) TimeTick() Timestamp {
|
|
return ksMsg.timeRange.timestampMax
|
|
}
|
|
|
|
func (suMsg *ddMsg) TimeTick() Timestamp {
|
|
return suMsg.timeRange.timestampMax
|
|
}
|
|
|
|
func (iMsg *insertMsg) TimeTick() Timestamp {
|
|
return iMsg.timeRange.timestampMax
|
|
}
|
|
|
|
func (dMsg *deleteMsg) TimeTick() Timestamp {
|
|
return dMsg.timeRange.timestampMax
|
|
}
|
|
|
|
func (stMsg *serviceTimeMsg) TimeTick() Timestamp {
|
|
return stMsg.timeRange.timestampMax
|
|
}
|
|
|
|
func (gcMsg *gcMsg) TimeTick() Timestamp {
|
|
return gcMsg.timeRange.timestampMax
|
|
}
|