2021-01-15 17:09:41 +08:00
|
|
|
package dataservice
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"strconv"
|
|
|
|
"sync"
|
|
|
|
|
2021-03-05 20:41:34 +08:00
|
|
|
"github.com/golang/protobuf/proto"
|
|
|
|
"github.com/zilliztech/milvus-distributed/internal/kv"
|
2021-03-02 15:52:42 +08:00
|
|
|
|
2021-02-03 18:55:00 +08:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
|
2021-01-15 17:09:41 +08:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
|
2021-03-05 20:41:34 +08:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
|
2021-01-15 17:09:41 +08:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
|
|
|
|
)
|
|
|
|
|
2021-03-05 20:41:34 +08:00
|
|
|
type errSegmentNotFound struct {
|
|
|
|
segmentID UniqueID
|
|
|
|
}
|
|
|
|
type errCollectionNotFound struct {
|
|
|
|
collectionID UniqueID
|
|
|
|
}
|
|
|
|
type collectionInfo struct {
|
|
|
|
ID UniqueID
|
|
|
|
Schema *schemapb.CollectionSchema
|
|
|
|
Partitions []UniqueID
|
|
|
|
}
|
|
|
|
type meta struct {
|
|
|
|
client kv.TxnBase // client of a reliable kv service, i.e. etcd client
|
|
|
|
collID2Info map[UniqueID]*collectionInfo // collection id to collection info
|
|
|
|
segID2Info map[UniqueID]*datapb.SegmentInfo // segment id to segment info
|
|
|
|
ddLock sync.RWMutex
|
|
|
|
}
|
2021-01-15 17:09:41 +08:00
|
|
|
|
2021-01-22 11:07:07 +08:00
|
|
|
func newErrSegmentNotFound(segmentID UniqueID) errSegmentNotFound {
|
|
|
|
return errSegmentNotFound{segmentID: segmentID}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (err errSegmentNotFound) Error() string {
|
|
|
|
return fmt.Sprintf("segment %d not found", err.segmentID)
|
|
|
|
}
|
|
|
|
|
|
|
|
func newErrCollectionNotFound(collectionID UniqueID) errCollectionNotFound {
|
|
|
|
return errCollectionNotFound{collectionID: collectionID}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (err errCollectionNotFound) Error() string {
|
|
|
|
return fmt.Sprintf("collection %d not found", err.collectionID)
|
|
|
|
}
|
|
|
|
|
2021-01-25 15:17:17 +08:00
|
|
|
func newMeta(kv kv.TxnBase) (*meta, error) {
|
2021-01-15 17:09:41 +08:00
|
|
|
mt := &meta{
|
|
|
|
client: kv,
|
|
|
|
collID2Info: make(map[UniqueID]*collectionInfo),
|
|
|
|
segID2Info: make(map[UniqueID]*datapb.SegmentInfo),
|
|
|
|
}
|
|
|
|
err := mt.reloadFromKV()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return mt, nil
|
|
|
|
}
|
|
|
|
|
2021-01-19 12:10:49 +08:00
|
|
|
func (meta *meta) reloadFromKV() error {
|
|
|
|
_, values, err := meta.client.LoadWithPrefix("segment")
|
2021-01-15 17:09:41 +08:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, value := range values {
|
|
|
|
segmentInfo := &datapb.SegmentInfo{}
|
|
|
|
err = proto.UnmarshalText(value, segmentInfo)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-01-19 12:10:49 +08:00
|
|
|
meta.segID2Info[segmentInfo.SegmentID] = segmentInfo
|
2021-01-15 17:09:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-01-19 12:10:49 +08:00
|
|
|
func (meta *meta) AddCollection(collectionInfo *collectionInfo) error {
|
|
|
|
meta.ddLock.Lock()
|
|
|
|
defer meta.ddLock.Unlock()
|
|
|
|
if _, ok := meta.collID2Info[collectionInfo.ID]; ok {
|
2021-01-15 17:09:41 +08:00
|
|
|
return fmt.Errorf("collection %s with id %d already exist", collectionInfo.Schema.Name, collectionInfo.ID)
|
|
|
|
}
|
2021-01-19 12:10:49 +08:00
|
|
|
meta.collID2Info[collectionInfo.ID] = collectionInfo
|
2021-01-15 17:09:41 +08:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-01-19 12:10:49 +08:00
|
|
|
func (meta *meta) DropCollection(collID UniqueID) error {
|
|
|
|
meta.ddLock.Lock()
|
|
|
|
defer meta.ddLock.Unlock()
|
2021-01-15 17:09:41 +08:00
|
|
|
|
2021-01-19 12:10:49 +08:00
|
|
|
if _, ok := meta.collID2Info[collID]; !ok {
|
2021-01-22 11:07:07 +08:00
|
|
|
return newErrCollectionNotFound(collID)
|
2021-01-15 17:09:41 +08:00
|
|
|
}
|
2021-02-02 14:25:58 +08:00
|
|
|
ids := make([]UniqueID, 0)
|
|
|
|
for i, info := range meta.segID2Info {
|
|
|
|
if info.CollectionID == collID {
|
|
|
|
delete(meta.segID2Info, i)
|
|
|
|
ids = append(ids, i)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if err := meta.removeSegments(ids); err != nil {
|
|
|
|
_ = meta.reloadFromKV()
|
|
|
|
return err
|
|
|
|
}
|
2021-01-19 12:10:49 +08:00
|
|
|
delete(meta.collID2Info, collID)
|
2021-01-15 17:09:41 +08:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-01-19 12:10:49 +08:00
|
|
|
func (meta *meta) HasCollection(collID UniqueID) bool {
|
|
|
|
meta.ddLock.RLock()
|
|
|
|
defer meta.ddLock.RUnlock()
|
|
|
|
_, ok := meta.collID2Info[collID]
|
2021-01-15 17:09:41 +08:00
|
|
|
return ok
|
|
|
|
}
|
2021-01-19 15:35:40 +08:00
|
|
|
func (meta *meta) GetCollection(collectionID UniqueID) (*collectionInfo, error) {
|
|
|
|
meta.ddLock.RLock()
|
|
|
|
defer meta.ddLock.RUnlock()
|
|
|
|
|
|
|
|
collectionInfo, ok := meta.collID2Info[collectionID]
|
|
|
|
if !ok {
|
2021-01-22 11:07:07 +08:00
|
|
|
return nil, newErrCollectionNotFound(collectionID)
|
2021-01-19 15:35:40 +08:00
|
|
|
}
|
|
|
|
return collectionInfo, nil
|
|
|
|
}
|
2021-01-15 17:09:41 +08:00
|
|
|
|
2021-02-02 14:25:58 +08:00
|
|
|
func (meta *meta) GetNumRowsOfCollection(collectionID UniqueID) (int64, error) {
|
|
|
|
meta.ddLock.RLock()
|
|
|
|
defer meta.ddLock.RUnlock()
|
|
|
|
var ret int64 = 0
|
|
|
|
for _, info := range meta.segID2Info {
|
|
|
|
if info.CollectionID == collectionID {
|
|
|
|
ret += info.NumRows
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ret, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (meta *meta) GetMemSizeOfCollection(collectionID UniqueID) (int64, error) {
|
|
|
|
meta.ddLock.RLock()
|
|
|
|
defer meta.ddLock.RUnlock()
|
|
|
|
var ret int64 = 0
|
|
|
|
for _, info := range meta.segID2Info {
|
|
|
|
if info.CollectionID == collectionID {
|
|
|
|
ret += info.MemSize
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ret, nil
|
|
|
|
}
|
|
|
|
|
2021-01-19 12:10:49 +08:00
|
|
|
func (meta *meta) AddSegment(segmentInfo *datapb.SegmentInfo) error {
|
|
|
|
meta.ddLock.Lock()
|
|
|
|
defer meta.ddLock.Unlock()
|
2021-01-23 14:41:29 +08:00
|
|
|
if _, ok := meta.segID2Info[segmentInfo.SegmentID]; ok {
|
2021-01-15 17:09:41 +08:00
|
|
|
return fmt.Errorf("segment %d already exist", segmentInfo.SegmentID)
|
|
|
|
}
|
2021-01-19 12:10:49 +08:00
|
|
|
meta.segID2Info[segmentInfo.SegmentID] = segmentInfo
|
|
|
|
if err := meta.saveSegmentInfo(segmentInfo); err != nil {
|
|
|
|
_ = meta.reloadFromKV()
|
2021-01-15 17:09:41 +08:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-01-19 12:10:49 +08:00
|
|
|
func (meta *meta) UpdateSegment(segmentInfo *datapb.SegmentInfo) error {
|
|
|
|
meta.ddLock.Lock()
|
|
|
|
defer meta.ddLock.Unlock()
|
2021-01-15 17:09:41 +08:00
|
|
|
|
2021-01-19 12:10:49 +08:00
|
|
|
meta.segID2Info[segmentInfo.SegmentID] = segmentInfo
|
|
|
|
if err := meta.saveSegmentInfo(segmentInfo); err != nil {
|
|
|
|
_ = meta.reloadFromKV()
|
2021-01-15 17:09:41 +08:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-01-19 15:35:40 +08:00
|
|
|
func (meta *meta) DropSegment(segmentID UniqueID) error {
|
|
|
|
meta.ddLock.Lock()
|
2021-02-04 15:23:21 +08:00
|
|
|
defer meta.ddLock.Unlock()
|
2021-01-19 15:35:40 +08:00
|
|
|
|
|
|
|
if _, ok := meta.segID2Info[segmentID]; !ok {
|
2021-01-22 11:07:07 +08:00
|
|
|
return newErrSegmentNotFound(segmentID)
|
2021-01-19 15:35:40 +08:00
|
|
|
}
|
|
|
|
delete(meta.segID2Info, segmentID)
|
2021-02-02 14:25:58 +08:00
|
|
|
if err := meta.removeSegmentInfo(segmentID); err != nil {
|
|
|
|
_ = meta.reloadFromKV()
|
|
|
|
return err
|
|
|
|
}
|
2021-01-19 15:35:40 +08:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-01-19 12:10:49 +08:00
|
|
|
func (meta *meta) GetSegment(segID UniqueID) (*datapb.SegmentInfo, error) {
|
|
|
|
meta.ddLock.RLock()
|
|
|
|
defer meta.ddLock.RUnlock()
|
2021-01-15 17:09:41 +08:00
|
|
|
|
2021-01-19 12:10:49 +08:00
|
|
|
segmentInfo, ok := meta.segID2Info[segID]
|
2021-01-15 17:09:41 +08:00
|
|
|
if !ok {
|
2021-01-22 11:07:07 +08:00
|
|
|
return nil, newErrSegmentNotFound(segID)
|
2021-01-15 17:09:41 +08:00
|
|
|
}
|
|
|
|
return segmentInfo, nil
|
|
|
|
}
|
|
|
|
|
2021-01-25 15:17:17 +08:00
|
|
|
func (meta *meta) OpenSegment(segmentID UniqueID, timetick Timestamp) error {
|
2021-01-19 12:10:49 +08:00
|
|
|
meta.ddLock.Lock()
|
|
|
|
defer meta.ddLock.Unlock()
|
2021-01-15 17:09:41 +08:00
|
|
|
|
2021-01-25 15:17:17 +08:00
|
|
|
segInfo, ok := meta.segID2Info[segmentID]
|
2021-01-15 17:09:41 +08:00
|
|
|
if !ok {
|
2021-01-25 15:17:17 +08:00
|
|
|
return newErrSegmentNotFound(segmentID)
|
2021-01-22 11:07:07 +08:00
|
|
|
}
|
|
|
|
|
2021-01-25 15:17:17 +08:00
|
|
|
segInfo.OpenTime = timetick
|
|
|
|
|
|
|
|
err := meta.saveSegmentInfo(segInfo)
|
2021-01-22 11:07:07 +08:00
|
|
|
if err != nil {
|
2021-01-25 15:17:17 +08:00
|
|
|
_ = meta.reloadFromKV()
|
2021-01-22 11:07:07 +08:00
|
|
|
return err
|
2021-01-15 17:09:41 +08:00
|
|
|
}
|
2021-01-25 15:17:17 +08:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (meta *meta) SealSegment(segID UniqueID, timetick Timestamp) error {
|
|
|
|
meta.ddLock.Lock()
|
|
|
|
defer meta.ddLock.Unlock()
|
|
|
|
|
|
|
|
segInfo, ok := meta.segID2Info[segID]
|
|
|
|
if !ok {
|
|
|
|
return newErrSegmentNotFound(segID)
|
|
|
|
}
|
|
|
|
|
|
|
|
segInfo.SealedTime = timetick
|
2021-01-15 17:09:41 +08:00
|
|
|
|
2021-01-25 15:17:17 +08:00
|
|
|
err := meta.saveSegmentInfo(segInfo)
|
2021-01-22 11:07:07 +08:00
|
|
|
if err != nil {
|
|
|
|
_ = meta.reloadFromKV()
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-01-25 15:17:17 +08:00
|
|
|
func (meta *meta) FlushSegment(segID UniqueID, timetick Timestamp) error {
|
2021-01-22 11:07:07 +08:00
|
|
|
meta.ddLock.Lock()
|
|
|
|
defer meta.ddLock.Unlock()
|
|
|
|
|
|
|
|
segInfo, ok := meta.segID2Info[segID]
|
|
|
|
if !ok {
|
|
|
|
return newErrSegmentNotFound(segID)
|
|
|
|
}
|
|
|
|
|
2021-01-25 15:17:17 +08:00
|
|
|
segInfo.FlushedTime = timetick
|
|
|
|
|
|
|
|
err := meta.saveSegmentInfo(segInfo)
|
2021-01-22 11:07:07 +08:00
|
|
|
if err != nil {
|
2021-01-25 15:17:17 +08:00
|
|
|
_ = meta.reloadFromKV()
|
2021-01-22 11:07:07 +08:00
|
|
|
return err
|
|
|
|
}
|
2021-01-25 15:17:17 +08:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-02-03 18:55:00 +08:00
|
|
|
func (meta *meta) SetSegmentState(segmentID UniqueID, state commonpb.SegmentState) error {
|
2021-01-25 15:17:17 +08:00
|
|
|
meta.ddLock.Lock()
|
|
|
|
defer meta.ddLock.Unlock()
|
2021-01-15 17:09:41 +08:00
|
|
|
|
2021-01-25 15:17:17 +08:00
|
|
|
segInfo, ok := meta.segID2Info[segmentID]
|
|
|
|
if !ok {
|
|
|
|
return newErrSegmentNotFound(segmentID)
|
|
|
|
}
|
|
|
|
segInfo.State = state
|
|
|
|
err := meta.saveSegmentInfo(segInfo)
|
2021-01-15 17:09:41 +08:00
|
|
|
if err != nil {
|
2021-01-19 12:10:49 +08:00
|
|
|
_ = meta.reloadFromKV()
|
2021-01-15 17:09:41 +08:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-02-02 14:25:58 +08:00
|
|
|
func (meta *meta) GetSegmentsOfCollection(collectionID UniqueID) []UniqueID {
|
2021-01-19 12:10:49 +08:00
|
|
|
meta.ddLock.RLock()
|
|
|
|
defer meta.ddLock.RUnlock()
|
2021-01-15 17:09:41 +08:00
|
|
|
|
2021-01-19 15:35:40 +08:00
|
|
|
ret := make([]UniqueID, 0)
|
|
|
|
for _, info := range meta.segID2Info {
|
|
|
|
if info.CollectionID == collectionID {
|
|
|
|
ret = append(ret, info.SegmentID)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2021-02-02 14:25:58 +08:00
|
|
|
func (meta *meta) GetSegmentsOfPartition(collectionID, partitionID UniqueID) []UniqueID {
|
2021-01-19 15:35:40 +08:00
|
|
|
meta.ddLock.RLock()
|
|
|
|
defer meta.ddLock.RUnlock()
|
|
|
|
|
|
|
|
ret := make([]UniqueID, 0)
|
|
|
|
for _, info := range meta.segID2Info {
|
2021-01-22 11:07:07 +08:00
|
|
|
if info.CollectionID == collectionID && info.PartitionID == partitionID {
|
2021-01-19 15:35:40 +08:00
|
|
|
ret = append(ret, info.SegmentID)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (meta *meta) AddPartition(collectionID UniqueID, partitionID UniqueID) error {
|
|
|
|
meta.ddLock.Lock()
|
|
|
|
defer meta.ddLock.Unlock()
|
|
|
|
coll, ok := meta.collID2Info[collectionID]
|
2021-01-15 17:09:41 +08:00
|
|
|
if !ok {
|
2021-01-22 11:07:07 +08:00
|
|
|
return newErrCollectionNotFound(collectionID)
|
2021-01-15 17:09:41 +08:00
|
|
|
}
|
2021-01-19 15:35:40 +08:00
|
|
|
|
2021-01-23 14:41:29 +08:00
|
|
|
for _, t := range coll.Partitions {
|
2021-01-19 15:35:40 +08:00
|
|
|
if t == partitionID {
|
2021-03-05 10:15:27 +08:00
|
|
|
return fmt.Errorf("partition %d already exists", partitionID)
|
2021-01-19 15:35:40 +08:00
|
|
|
}
|
|
|
|
}
|
2021-01-23 14:41:29 +08:00
|
|
|
coll.Partitions = append(coll.Partitions, partitionID)
|
2021-01-19 15:35:40 +08:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (meta *meta) DropPartition(collID UniqueID, partitionID UniqueID) error {
|
|
|
|
meta.ddLock.Lock()
|
|
|
|
defer meta.ddLock.Unlock()
|
|
|
|
|
|
|
|
collection, ok := meta.collID2Info[collID]
|
|
|
|
if !ok {
|
2021-01-22 11:07:07 +08:00
|
|
|
return newErrCollectionNotFound(collID)
|
2021-01-19 15:35:40 +08:00
|
|
|
}
|
|
|
|
idx := -1
|
2021-01-23 14:41:29 +08:00
|
|
|
for i, id := range collection.Partitions {
|
2021-01-19 15:35:40 +08:00
|
|
|
if partitionID == id {
|
|
|
|
idx = i
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if idx == -1 {
|
|
|
|
return fmt.Errorf("cannot find partition id %d", partitionID)
|
|
|
|
}
|
|
|
|
|
2021-02-02 14:25:58 +08:00
|
|
|
ids := make([]UniqueID, 0)
|
|
|
|
for i, info := range meta.segID2Info {
|
|
|
|
if info.PartitionID == partitionID {
|
|
|
|
delete(meta.segID2Info, i)
|
|
|
|
ids = append(ids, i)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if err := meta.removeSegments(ids); err != nil {
|
|
|
|
_ = meta.reloadFromKV()
|
|
|
|
return err
|
|
|
|
}
|
2021-01-23 14:41:29 +08:00
|
|
|
collection.Partitions = append(collection.Partitions[:idx], collection.Partitions[idx+1:]...)
|
2021-01-19 15:35:40 +08:00
|
|
|
return nil
|
2021-01-15 17:09:41 +08:00
|
|
|
}
|
|
|
|
|
2021-02-02 14:25:58 +08:00
|
|
|
func (meta *meta) GetNumRowsOfPartition(collectionID UniqueID, partitionID UniqueID) (int64, error) {
|
|
|
|
meta.ddLock.RLock()
|
|
|
|
defer meta.ddLock.RUnlock()
|
|
|
|
var ret int64 = 0
|
|
|
|
for _, info := range meta.segID2Info {
|
|
|
|
if info.CollectionID == collectionID && info.PartitionID == partitionID {
|
|
|
|
ret += info.NumRows
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ret, nil
|
|
|
|
}
|
|
|
|
|
2021-01-19 12:10:49 +08:00
|
|
|
func (meta *meta) saveSegmentInfo(segmentInfo *datapb.SegmentInfo) error {
|
2021-01-15 17:09:41 +08:00
|
|
|
segBytes := proto.MarshalTextString(segmentInfo)
|
|
|
|
|
2021-01-19 12:10:49 +08:00
|
|
|
return meta.client.Save("/segment/"+strconv.FormatInt(segmentInfo.SegmentID, 10), segBytes)
|
2021-01-15 17:09:41 +08:00
|
|
|
}
|
|
|
|
|
2021-01-19 12:10:49 +08:00
|
|
|
func (meta *meta) removeSegmentInfo(segID UniqueID) error {
|
|
|
|
return meta.client.Remove("/segment/" + strconv.FormatInt(segID, 10))
|
2021-01-15 17:09:41 +08:00
|
|
|
}
|
2021-02-02 14:25:58 +08:00
|
|
|
|
|
|
|
func (meta *meta) removeSegments(segIDs []UniqueID) error {
|
|
|
|
segmentPaths := make([]string, len(segIDs))
|
|
|
|
for i, id := range segIDs {
|
|
|
|
segmentPaths[i] = "/segment/" + strconv.FormatInt(id, 10)
|
|
|
|
}
|
|
|
|
return meta.client.MultiRemove(segmentPaths)
|
|
|
|
}
|
|
|
|
|
2021-02-02 18:53:10 +08:00
|
|
|
func BuildSegment(collectionID UniqueID, partitionID UniqueID, segmentID UniqueID, channelName string) (*datapb.SegmentInfo, error) {
|
2021-01-25 15:17:17 +08:00
|
|
|
return &datapb.SegmentInfo{
|
2021-02-02 18:53:10 +08:00
|
|
|
SegmentID: segmentID,
|
|
|
|
CollectionID: collectionID,
|
|
|
|
PartitionID: partitionID,
|
|
|
|
InsertChannel: channelName,
|
|
|
|
OpenTime: 0,
|
|
|
|
SealedTime: 0,
|
|
|
|
NumRows: 0,
|
|
|
|
MemSize: 0,
|
2021-02-03 18:55:00 +08:00
|
|
|
State: commonpb.SegmentState_SegmentGrowing,
|
2021-03-02 15:52:42 +08:00
|
|
|
StartPosition: &internalpb2.MsgPosition{
|
|
|
|
ChannelName: channelName,
|
|
|
|
MsgID: "0",
|
|
|
|
Timestamp: 0,
|
|
|
|
},
|
|
|
|
EndPosition: &internalpb2.MsgPosition{
|
|
|
|
ChannelName: channelName,
|
|
|
|
MsgID: "0",
|
|
|
|
Timestamp: 0,
|
|
|
|
},
|
2021-01-25 15:17:17 +08:00
|
|
|
}, nil
|
|
|
|
}
|