mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-11 09:46:26 +08:00
10374f15d7
Signed-off-by: XuanYang-cn <xuan.yang@zilliz.com>
82 lines
1.6 KiB
Go
82 lines
1.6 KiB
Go
package datanode
|
|
|
|
import (
|
|
"github.com/zilliztech/milvus-distributed/internal/msgstream"
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
|
|
"github.com/zilliztech/milvus-distributed/internal/util/flowgraph"
|
|
)
|
|
|
|
type (
|
|
Msg = flowgraph.Msg
|
|
MsgStreamMsg = flowgraph.MsgStreamMsg
|
|
)
|
|
|
|
type (
|
|
key2SegMsg struct {
|
|
tsMessages []msgstream.TsMsg
|
|
timeRange TimeRange
|
|
}
|
|
|
|
ddMsg struct {
|
|
collectionRecords map[UniqueID][]*metaOperateRecord
|
|
partitionRecords map[UniqueID][]*metaOperateRecord
|
|
flushMessages []*flushMsg
|
|
gcRecord *gcRecord
|
|
timeRange TimeRange
|
|
}
|
|
|
|
metaOperateRecord struct {
|
|
createOrDrop bool // create: true, drop: false
|
|
timestamp Timestamp
|
|
}
|
|
|
|
insertMsg struct {
|
|
insertMessages []*msgstream.InsertMsg
|
|
flushMessages []*flushMsg
|
|
gcRecord *gcRecord
|
|
timeRange TimeRange
|
|
startPositions []*internalpb2.MsgPosition
|
|
}
|
|
|
|
deleteMsg struct {
|
|
deleteMessages []*msgstream.DeleteMsg
|
|
timeRange TimeRange
|
|
}
|
|
|
|
gcMsg struct {
|
|
gcRecord *gcRecord
|
|
timeRange TimeRange
|
|
}
|
|
|
|
gcRecord struct {
|
|
collections []UniqueID
|
|
}
|
|
|
|
flushMsg struct {
|
|
msgID UniqueID
|
|
timestamp Timestamp
|
|
segmentIDs []UniqueID
|
|
collectionID UniqueID
|
|
}
|
|
)
|
|
|
|
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 (gcMsg *gcMsg) TimeTick() Timestamp {
|
|
return gcMsg.timeRange.timestampMax
|
|
}
|