Fix not fill timestamp when use collection created ts (#22629)

Signed-off-by: yah01 <yang.cen@zilliz.com>
pull/22684/head
yah01 2023-03-08 18:53:51 +08:00 committed by GitHub
parent ae09122cf0
commit efdc77bce6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -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 {

View File

@ -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`

View File

@ -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