From e0a2f1ce8254c4f39ad5cd3c2788b4f2a0d6fda4 Mon Sep 17 00:00:00 2001 From: shaoyue Date: Fri, 24 Dec 2021 13:31:30 +0800 Subject: [PATCH] [skip e2e] Add comment for IndexCodec (#14139) Signed-off-by: shaoyue.chen --- internal/storage/data_codec.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/storage/data_codec.go b/internal/storage/data_codec.go index 914270f272..283dd66b5d 100644 --- a/internal/storage/data_codec.go +++ b/internal/storage/data_codec.go @@ -1235,6 +1235,7 @@ func NewIndexCodec() *IndexCodec { return &IndexCodec{} } +// Serialize serializes index func (indexCodec *IndexCodec) Serialize(blobs []*Blob, params map[string]string, indexName string, indexID UniqueID) ([]*Blob, error) { paramsBytes, err := json.Marshal(struct { Params map[string]string @@ -1252,6 +1253,7 @@ func (indexCodec *IndexCodec) Serialize(blobs []*Blob, params map[string]string, return blobs, nil } +// Deserialize deserializes index func (indexCodec *IndexCodec) Deserialize(blobs []*Blob) ([]*Blob, map[string]string, string, UniqueID, error) { var file *Blob for i := 0; i < len(blobs); i++ {