mirror of https://github.com/milvus-io/milvus.git
Signed-off-by: yah01 <yang.cen@zilliz.com>pull/22653/head
parent
21af6409f0
commit
158c4ec24e
|
@ -277,7 +277,11 @@ func (h *ServerHandler) GetChannelSeekPosition(channel *channel, partitionID Uni
|
|||
}
|
||||
|
||||
func getCollectionStartPosition(channel string, collectionInfo *collectionInfo) *internalpb.MsgPosition {
|
||||
return toMsgPosition(channel, collectionInfo.StartPositions)
|
||||
position := toMsgPosition(channel, collectionInfo.StartPositions)
|
||||
if position != nil {
|
||||
position.Timestamp = collectionInfo.CreatedAt
|
||||
}
|
||||
return position
|
||||
}
|
||||
|
||||
func toMsgPosition(channel string, startPositions []*commonpb.KeyDataPair) *internalpb.MsgPosition {
|
||||
|
|
|
@ -67,6 +67,7 @@ type collectionInfo struct {
|
|||
Partitions []int64
|
||||
StartPositions []*commonpb.KeyDataPair
|
||||
Properties map[string]string
|
||||
CreatedAt Timestamp
|
||||
}
|
||||
|
||||
// NewMeta creates meta from provided `kv.TxnKV`
|
||||
|
|
|
@ -969,6 +969,7 @@ func (s *Server) loadCollectionFromRootCoord(ctx context.Context, collectionID i
|
|||
Partitions: presp.PartitionIDs,
|
||||
StartPositions: resp.GetStartPositions(),
|
||||
Properties: properties,
|
||||
CreatedAt: resp.GetCreatedTimestamp(),
|
||||
}
|
||||
s.meta.AddCollection(collInfo)
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue