diff --git a/internal/indexcoord/meta_table.go b/internal/indexcoord/meta_table.go index f6fb79ae764a0dacd87eca09c2ff6a93de6420d7..f47e88cb6db7c2793ace5a740aeee9e2325a6357 100644 --- a/internal/indexcoord/meta_table.go +++ b/internal/indexcoord/meta_table.go @@ -316,6 +316,7 @@ func (mt *metaTable) GetIndexFilePathInfo(indexBuildID UniqueID) (*indexpb.Index return nil, fmt.Errorf("index not exists with ID = %d", indexBuildID) } ret.IndexFilePaths = meta.indexMeta.IndexFilePaths + ret.SerializedSize = meta.indexMeta.GetSerializeSize() return ret, nil } diff --git a/internal/proto/index_coord.proto b/internal/proto/index_coord.proto index 3496901c04e93ca17809ca410b8761e845d05593..b5e3cef567d8576b7b22cadfdef9d1802687055f 100644 --- a/internal/proto/index_coord.proto +++ b/internal/proto/index_coord.proto @@ -95,6 +95,7 @@ message IndexFilePathInfo { common.Status status = 1; int64 indexBuildID = 2; repeated string index_file_paths = 3; + uint64 serialized_size = 4; } message GetIndexFilePathsResponse { diff --git a/internal/proto/indexpb/index_coord.pb.go b/internal/proto/indexpb/index_coord.pb.go index 0257a4a2394c780aefdff97fd48c63a268c82b3c..c0d9cf1d83fb56f408ac16d1037ae6b4de275a8a 100644 --- a/internal/proto/indexpb/index_coord.pb.go +++ b/internal/proto/indexpb/index_coord.pb.go @@ -567,6 +567,7 @@ type IndexFilePathInfo struct { Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` IndexBuildID int64 `protobuf:"varint,2,opt,name=indexBuildID,proto3" json:"indexBuildID,omitempty"` IndexFilePaths []string `protobuf:"bytes,3,rep,name=index_file_paths,json=indexFilePaths,proto3" json:"index_file_paths,omitempty"` + SerializedSize uint64 `protobuf:"varint,4,opt,name=serialized_size,json=serializedSize,proto3" json:"serialized_size,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -618,6 +619,13 @@ func (m *IndexFilePathInfo) GetIndexFilePaths() []string { return nil } +func (m *IndexFilePathInfo) GetSerializedSize() uint64 { + if m != nil { + return m.SerializedSize + } + return 0 +} + type GetIndexFilePathsResponse struct { Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` FilePaths []*IndexFilePathInfo `protobuf:"bytes,2,rep,name=file_paths,json=filePaths,proto3" json:"file_paths,omitempty"` @@ -834,73 +842,74 @@ func init() { func init() { proto.RegisterFile("index_coord.proto", fileDescriptor_f9e019eb3fda53c2) } var fileDescriptor_f9e019eb3fda53c2 = []byte{ - // 1057 bytes of a gzipped FileDescriptorProto + // 1073 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x36, 0x4d, 0x5b, 0x3f, 0x23, 0xc5, 0x88, 0xb7, 0x69, 0xc0, 0x28, 0x0d, 0x22, 0xb3, 0x49, - 0xaa, 0x16, 0x89, 0x1c, 0x28, 0x4d, 0x7b, 0x2a, 0xd0, 0xda, 0x42, 0x0c, 0xa3, 0x70, 0x60, 0xac, - 0x8d, 0x1e, 0x0a, 0x14, 0xc2, 0x5a, 0x1c, 0xd9, 0x8b, 0xf0, 0x47, 0xe6, 0xae, 0x92, 0xda, 0xc7, - 0xa2, 0xf7, 0xde, 0xd2, 0x47, 0xe9, 0x73, 0xe4, 0x71, 0x7a, 0x2b, 0x76, 0xb9, 0xa4, 0x49, 0x89, - 0x72, 0xe4, 0xba, 0x69, 0x2f, 0xbd, 0x71, 0x86, 0xdf, 0xec, 0xec, 0x7c, 0x3b, 0xf3, 0xed, 0xc2, - 0x3a, 0x0f, 0x3d, 0xfc, 0x79, 0x30, 0x8c, 0xa2, 0xd8, 0xeb, 0x8e, 0xe3, 0x48, 0x46, 0x84, 0x04, - 0xdc, 0x7f, 0x3d, 0x11, 0x89, 0xd5, 0xd5, 0xff, 0x5b, 0xcd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, 0x06, 0x7c, 0xc9, 0x94, 0x3f, 0x01, 0x4c, + 0x9a, 0x8d, 0x2c, 0xd6, 0x8c, 0xb3, 0x04, 0x4e, 0xc3, 0xc6, 0xdb, 0x73, 0x58, 0xcb, 0x8f, 0x35, + 0xe4, 0xf3, 0xa2, 0xd8, 0xc2, 0xa1, 0xaf, 0xf1, 0xc5, 0x22, 0xd0, 0x71, 0xaa, 0x18, 0xd6, 0x67, + 0x74, 0x87, 0x3c, 0xba, 0x68, 0x8b, 0x69, 0x8d, 0x6e, 0x3c, 0x5e, 0x10, 0x3d, 0xce, 0xb9, 0x0f, + 0xd5, 0x71, 0x3b, 0x93, 0x7b, 0x45, 0xd1, 0xd3, 0xdd, 0xde, 0xb8, 0x48, 0xf1, 0xdc, 0x25, 0xd2, + 0x03, 0xd8, 0x41, 0xb9, 0x87, 0x32, 0xe6, 0x7d, 0x41, 0x1e, 0x14, 0x5e, 0xe2, 0x04, 0x90, 0x6e, + 0xfa, 0xf0, 0x9d, 0xb8, 0xf4, 0xc8, 0x9d, 0x37, 0x2b, 0x46, 0x06, 0xd5, 0xc4, 0xff, 0xe1, 0x49, + 0xbd, 0x87, 0x27, 0x75, 0x08, 0xb5, 0xcc, 0x0c, 0x4d, 0x0a, 0x1f, 0xcb, 0xec, 0x90, 0xfd, 0x7f, + 0x37, 0xc6, 0xd6, 0x97, 0x3f, 0x76, 0x8e, 0xb9, 0x3c, 0x19, 0x1d, 0xa9, 0xd4, 0x9b, 0x09, 0xf2, + 0x31, 0x8f, 0xcc, 0xd7, 0x66, 0xca, 0xd0, 0xa6, 0xde, 0x69, 0x53, 0x97, 0x31, 0x3c, 0x3a, 0x2a, + 0x69, 0xf3, 0xe9, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x29, 0x0d, 0x3e, 0x47, 0x0f, 0x00, 0x00, } diff --git a/internal/querycoord/cluster.go b/internal/querycoord/cluster.go index 8b5ee373a016420ef20fb9651eb29853bb839641..d0ca8b7f6a6bc1582241ed74e1faac0955e418a8 100644 --- a/internal/querycoord/cluster.go +++ b/internal/querycoord/cluster.go @@ -35,7 +35,6 @@ import ( "github.com/milvus-io/milvus/internal/proto/internalpb" "github.com/milvus-io/milvus/internal/proto/milvuspb" "github.com/milvus-io/milvus/internal/proto/querypb" - "github.com/milvus-io/milvus/internal/storage" "github.com/milvus-io/milvus/internal/util/sessionutil" "github.com/milvus-io/milvus/internal/util/typeutil" ) @@ -721,20 +720,7 @@ func estimateSegmentsSize(segments *querypb.LoadSegmentsRequest, kvClient kv.Dat // get index size if loadInfo.EnableIndex { for _, pathInfo := range loadInfo.IndexPathInfos { - for _, path := range pathInfo.IndexFilePaths { - indexSize, err := storage.EstimateMemorySize(kvClient, path) - if err != nil { - indexSize, err = storage.GetBinlogSize(kvClient, path) - if err != nil { - log.Warn("estimate index size wrong", - zap.Int64("segmentID", loadInfo.GetSegmentID()), - zap.String("path", path), - zap.Error(err)) - return 0, err - } - } - segmentSize += indexSize - } + segmentSize += int64(pathInfo.GetSerializedSize()) } continue } diff --git a/internal/querycoord/cluster_test.go b/internal/querycoord/cluster_test.go index 9ea1d833dd0ee8e484e026dbc7750fdd58b051c1..77bf014e1dea63f710ed9b082b0988c87c501d63 100644 --- a/internal/querycoord/cluster_test.go +++ b/internal/querycoord/cluster_test.go @@ -700,17 +700,19 @@ func TestEstimateSegmentSize(t *testing.T) { indexInfo := &indexpb.IndexFilePathInfo{ IndexFilePaths: indexPath, + SerializedSize: 1024, } loadInfo.IndexPathInfos = []*indexpb.IndexFilePathInfo{indexInfo} loadInfo.EnableIndex = true size, err = estimateSegmentsSize(loadReq, dataKV) assert.NoError(t, err) - assert.NotEqual(t, int64(0), size) + assert.Equal(t, int64(1024), size) indexInfo.IndexFilePaths = []string{"&*^*(^*(&*%^&*^(&"} + indexInfo.SerializedSize = 0 size, err = estimateSegmentsSize(loadReq, dataKV) - assert.Error(t, err) + assert.NoError(t, err) assert.Equal(t, int64(0), size) cancel()