未验证 提交 efdc77bc 编写于 作者: Y yah01 提交者: GitHub

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

Signed-off-by: Nyah01 <yang.cen@zilliz.com>
上级 ae09122c
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册