mirror of https://github.com/milvus-io/milvus.git
Fix not fill timestamp when use collection created ts (#22629)
Signed-off-by: yah01 <yang.cen@zilliz.com>pull/22684/head
parent
ae09122cf0
commit
efdc77bce6
|
@ -280,7 +280,11 @@ func (h *ServerHandler) GetChannelSeekPosition(channel *channel, partitionID Uni
|
|||
}
|
||||
|
||||
func getCollectionStartPosition(channel string, collectionInfo *collectionInfo) *msgpb.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) *msgpb.MsgPosition {
|
||||
|
|
|
@ -76,6 +76,7 @@ type collectionInfo struct {
|
|||
Partitions []int64
|
||||
StartPositions []*commonpb.KeyDataPair
|
||||
Properties map[string]string
|
||||
CreatedAt Timestamp
|
||||
}
|
||||
|
||||
// NewMeta creates meta from provided `kv.TxnKV`
|
||||
|
|
|
@ -1007,6 +1007,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