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 {
|
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 {
|
func toMsgPosition(channel string, startPositions []*commonpb.KeyDataPair) *msgpb.MsgPosition {
|
||||||
|
|
|
@ -76,6 +76,7 @@ type collectionInfo struct {
|
||||||
Partitions []int64
|
Partitions []int64
|
||||||
StartPositions []*commonpb.KeyDataPair
|
StartPositions []*commonpb.KeyDataPair
|
||||||
Properties map[string]string
|
Properties map[string]string
|
||||||
|
CreatedAt Timestamp
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewMeta creates meta from provided `kv.TxnKV`
|
// NewMeta creates meta from provided `kv.TxnKV`
|
||||||
|
|
|
@ -1007,6 +1007,7 @@ func (s *Server) loadCollectionFromRootCoord(ctx context.Context, collectionID i
|
||||||
Partitions: presp.PartitionIDs,
|
Partitions: presp.PartitionIDs,
|
||||||
StartPositions: resp.GetStartPositions(),
|
StartPositions: resp.GetStartPositions(),
|
||||||
Properties: properties,
|
Properties: properties,
|
||||||
|
CreatedAt: resp.GetCreatedTimestamp(),
|
||||||
}
|
}
|
||||||
s.meta.AddCollection(collInfo)
|
s.meta.AddCollection(collInfo)
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue