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

Signed-off-by: yah01 <yang.cen@zilliz.com>
pull/22653/head
yah01 2023-03-09 10:21:52 +08:00 committed by GitHub
parent 21af6409f0
commit 158c4ec24e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

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

View File

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

View File

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