From 53a49a92550e2d7b765d9c2ae80c9aa44721f06d Mon Sep 17 00:00:00 2001 From: "cai.zhang" Date: Thu, 16 Jun 2022 20:12:11 +0800 Subject: [PATCH] GetIndexState only get the state generated call CreateIndex (#17549) Signed-off-by: Cai.Zhang --- internal/datacoord/mock_test.go | 6 + internal/distributed/proxy/service_test.go | 4 + .../distributed/rootcoord/client/client.go | 15 ++ internal/distributed/rootcoord/service.go | 6 + internal/proto/etcd_meta.proto | 1 + internal/proto/etcdpb/etcd_meta.pb.go | 102 ++++---- internal/proto/root_coord.proto | 2 + internal/proto/rootcoordpb/root_coord.pb.go | 237 ++++++++++-------- internal/proxy/rootcoord_mock_test.go | 29 +++ internal/proxy/task.go | 160 +----------- internal/proxy/task_index_test.go | 139 +--------- internal/rootcoord/meta_table.go | 34 +++ internal/rootcoord/meta_table_test.go | 80 ++++++ internal/rootcoord/root_coord.go | 46 ++++ internal/rootcoord/root_coord_test.go | 105 ++++++++ internal/rootcoord/task.go | 1 + internal/types/types.go | 2 + internal/util/mock/grpc_rootcoord_client.go | 6 + 18 files changed, 543 insertions(+), 432 deletions(-) diff --git a/internal/datacoord/mock_test.go b/internal/datacoord/mock_test.go index 753dcf8c08..8edb3ee372 100644 --- a/internal/datacoord/mock_test.go +++ b/internal/datacoord/mock_test.go @@ -22,6 +22,8 @@ import ( "sync/atomic" "time" + "github.com/milvus-io/milvus/internal/proto/indexpb" + "github.com/milvus-io/milvus/internal/kv" memkv "github.com/milvus-io/milvus/internal/kv/mem" "github.com/milvus-io/milvus/internal/proto/commonpb" @@ -358,6 +360,10 @@ func (m *mockRootCoordService) DescribeIndex(ctx context.Context, req *milvuspb. panic("not implemented") // TODO: Implement } +func (m *mockRootCoordService) GetIndexState(ctx context.Context, req *milvuspb.GetIndexStateRequest) (*indexpb.GetIndexStatesResponse, error) { + panic("not implemented") // TODO: Implement +} + func (m *mockRootCoordService) DropIndex(ctx context.Context, req *milvuspb.DropIndexRequest) (*commonpb.Status, error) { panic("not implemented") // TODO: Implement } diff --git a/internal/distributed/proxy/service_test.go b/internal/distributed/proxy/service_test.go index 2dc9205b54..aaf25a4343 100644 --- a/internal/distributed/proxy/service_test.go +++ b/internal/distributed/proxy/service_test.go @@ -162,6 +162,10 @@ func (m *MockRootCoord) DescribeIndex(ctx context.Context, req *milvuspb.Describ return nil, nil } +func (m *MockRootCoord) GetIndexState(ctx context.Context, req *milvuspb.GetIndexStateRequest) (*indexpb.GetIndexStatesResponse, error) { + return nil, nil +} + func (m *MockRootCoord) DropIndex(ctx context.Context, req *milvuspb.DropIndexRequest) (*commonpb.Status, error) { return nil, nil } diff --git a/internal/distributed/rootcoord/client/client.go b/internal/distributed/rootcoord/client/client.go index 5e972c2352..1e9e1e5c47 100644 --- a/internal/distributed/rootcoord/client/client.go +++ b/internal/distributed/rootcoord/client/client.go @@ -20,6 +20,8 @@ import ( "context" "fmt" + "github.com/milvus-io/milvus/internal/proto/indexpb" + "github.com/milvus-io/milvus/internal/log" "github.com/milvus-io/milvus/internal/proto/commonpb" "github.com/milvus-io/milvus/internal/proto/datapb" @@ -325,6 +327,19 @@ func (c *Client) DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRe return ret.(*milvuspb.DescribeIndexResponse), err } +func (c *Client) GetIndexState(ctx context.Context, in *milvuspb.GetIndexStateRequest) (*indexpb.GetIndexStatesResponse, error) { + ret, err := c.grpcClient.ReCall(ctx, func(client interface{}) (interface{}, error) { + if !funcutil.CheckCtxValid(ctx) { + return nil, ctx.Err() + } + return client.(rootcoordpb.RootCoordClient).GetIndexState(ctx, in) + }) + if err != nil || ret == nil { + return nil, err + } + return ret.(*indexpb.GetIndexStatesResponse), err +} + // AllocTimestamp global timestamp allocator func (c *Client) AllocTimestamp(ctx context.Context, in *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error) { ret, err := c.grpcClient.ReCall(ctx, func(client interface{}) (interface{}, error) { diff --git a/internal/distributed/rootcoord/service.go b/internal/distributed/rootcoord/service.go index 1359f9f8d5..03274911e2 100644 --- a/internal/distributed/rootcoord/service.go +++ b/internal/distributed/rootcoord/service.go @@ -24,6 +24,8 @@ import ( "sync" "time" + "github.com/milvus-io/milvus/internal/proto/indexpb" + ot "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing" clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" @@ -395,6 +397,10 @@ func (s *Server) DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRe return s.rootCoord.DescribeIndex(ctx, in) } +func (s *Server) GetIndexState(ctx context.Context, in *milvuspb.GetIndexStateRequest) (*indexpb.GetIndexStatesResponse, error) { + return s.rootCoord.GetIndexState(ctx, in) +} + // AllocTimestamp global timestamp allocator func (s *Server) AllocTimestamp(ctx context.Context, in *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error) { return s.rootCoord.AllocTimestamp(ctx, in) diff --git a/internal/proto/etcd_meta.proto b/internal/proto/etcd_meta.proto index 2606008efa..2fb4608d10 100644 --- a/internal/proto/etcd_meta.proto +++ b/internal/proto/etcd_meta.proto @@ -45,6 +45,7 @@ message SegmentIndexInfo { int64 indexID = 5; int64 buildID = 6; bool enable_index = 7; + bool by_auto_flush = 8; } message CollectionMeta { diff --git a/internal/proto/etcdpb/etcd_meta.pb.go b/internal/proto/etcdpb/etcd_meta.pb.go index c6720df55a..50f332db1c 100644 --- a/internal/proto/etcdpb/etcd_meta.pb.go +++ b/internal/proto/etcdpb/etcd_meta.pb.go @@ -314,6 +314,7 @@ type SegmentIndexInfo struct { IndexID int64 `protobuf:"varint,5,opt,name=indexID,proto3" json:"indexID,omitempty"` BuildID int64 `protobuf:"varint,6,opt,name=buildID,proto3" json:"buildID,omitempty"` EnableIndex bool `protobuf:"varint,7,opt,name=enable_index,json=enableIndex,proto3" json:"enable_index,omitempty"` + ByAutoFlush bool `protobuf:"varint,8,opt,name=by_auto_flush,json=byAutoFlush,proto3" json:"by_auto_flush,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -393,6 +394,13 @@ func (m *SegmentIndexInfo) GetEnableIndex() bool { return false } +func (m *SegmentIndexInfo) GetByAutoFlush() bool { + if m != nil { + return m.ByAutoFlush + } + return false +} + type CollectionMeta struct { ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Schema *schemapb.CollectionSchema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` @@ -484,50 +492,52 @@ func init() { func init() { proto.RegisterFile("etcd_meta.proto", fileDescriptor_975d306d62b73e88) } var fileDescriptor_975d306d62b73e88 = []byte{ - // 714 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x6a, 0xdb, 0x4c, - 0x14, 0x45, 0x91, 0x63, 0x47, 0xd7, 0x8a, 0x93, 0xcc, 0xf7, 0xb5, 0x0c, 0x21, 0x6d, 0x15, 0x41, - 0x8a, 0xa0, 0xd4, 0xa6, 0x49, 0xe9, 0xae, 0xd0, 0xd6, 0x22, 0x60, 0xda, 0x06, 0x33, 0x09, 0x5d, - 0x74, 0x23, 0xc6, 0xd2, 0xd8, 0x1e, 0xd0, 0x8f, 0xd1, 0x8c, 0x42, 0xbc, 0xeb, 0xba, 0x2f, 0xda, - 0x45, 0xdf, 0xa1, 0x14, 0xcd, 0x48, 0xf2, 0x4f, 0x92, 0x65, 0x77, 0xbe, 0x67, 0xee, 0xb9, 0xba, - 0x73, 0xe6, 0x1c, 0xc3, 0x01, 0x93, 0x61, 0x14, 0x24, 0x4c, 0xd2, 0xfe, 0x22, 0xcf, 0x64, 0x86, - 0x8e, 0x12, 0x1e, 0xdf, 0x16, 0x42, 0x57, 0xfd, 0xf2, 0xf4, 0xd8, 0x0e, 0xb3, 0x24, 0xc9, 0x52, - 0x0d, 0x1d, 0xdb, 0x22, 0x9c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f, 0x5d, 0x7c, 0x7f, 0x33, 0xe3, 0x72, 0x5e, 0x4c, - 0x4a, 0x2f, 0x0c, 0xf4, 0x35, 0x5e, 0xf3, 0xac, 0xfa, 0x35, 0xe0, 0xa9, 0x64, 0x79, 0x4a, 0xe3, - 0x81, 0xba, 0xd9, 0xa0, 0x4c, 0xe4, 0x62, 0x32, 0x69, 0xab, 0xea, 0xe2, 0x6f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xf7, 0x5a, 0x33, 0x47, 0x2c, 0x06, 0x00, 0x00, + // 737 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x4d, 0x6b, 0xdb, 0x4a, + 0x14, 0x45, 0x96, 0x63, 0x47, 0xd7, 0x8a, 0x93, 0xcc, 0xfb, 0x60, 0x08, 0x79, 0xef, 0x29, 0x82, + 0x3c, 0x04, 0xa5, 0x36, 0x4d, 0x4a, 0x77, 0x85, 0xa6, 0x16, 0x01, 0xd3, 0x36, 0x98, 0x49, 0xe8, + 0xa2, 0x1b, 0x31, 0x96, 0xc6, 0xf6, 0x80, 0x3e, 0x8c, 0x66, 0x14, 0xe2, 0x5d, 0xd7, 0xed, 0x4f, + 0xed, 0x7f, 0x28, 0x45, 0x33, 0x92, 0xfc, 0x91, 0x64, 0xd9, 0x9d, 0xef, 0x99, 0x7b, 0xae, 0xee, + 0x9c, 0x39, 0xc7, 0x70, 0xc8, 0x64, 0x18, 0x05, 0x09, 0x93, 0x74, 0xb0, 0xcc, 0x33, 0x99, 0xa1, + 0xe3, 0x84, 0xc7, 0xf7, 0x85, 0xd0, 0xd5, 0xa0, 0x3c, 0x3d, 0xb1, 0xc3, 0x2c, 0x49, 0xb2, 0x54, + 0x43, 0x27, 0xb6, 0x08, 0x17, 0x2c, 0xa9, 0xda, 0xdd, 0xaf, 0x06, 0x58, 0x93, 0x3c, 0x7b, 0x58, + 0x7d, 0x62, 0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x8e, 0xce, 0xc5, 0xa3, 0x54, 0x77, 0x1e, 0xa7, 0xfa, 0xfd, + 0xe5, 0x97, 0x57, 0x73, 0x2e, 0x17, 0xc5, 0xb4, 0xf4, 0xcb, 0x50, 0x5f, 0xe3, 0x25, 0xcf, 0xaa, + 0x5f, 0x43, 0x9e, 0x4a, 0x96, 0xa7, 0x34, 0x1e, 0xaa, 0x9b, 0x0d, 0xcb, 0xd4, 0x2e, 0xa7, 0xd3, + 0x8e, 0xaa, 0x2e, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x24, 0xa2, 0x1e, 0x16, 0x50, 0x06, 0x00, + 0x00, } diff --git a/internal/proto/root_coord.proto b/internal/proto/root_coord.proto index a6afd2c90b..1d534bcefa 100644 --- a/internal/proto/root_coord.proto +++ b/internal/proto/root_coord.proto @@ -9,6 +9,7 @@ import "internal.proto"; import "proxy.proto"; import "data_coord.proto"; import "etcd_meta.proto"; +import "index_coord.proto"; service RootCoord { rpc GetComponentStates(internal.GetComponentStatesRequest) returns (internal.ComponentStates) {} @@ -98,6 +99,7 @@ service RootCoord { rpc CreateIndex(milvus.CreateIndexRequest) returns (common.Status) {} rpc DescribeIndex(milvus.DescribeIndexRequest) returns (milvus.DescribeIndexResponse) {} rpc DropIndex(milvus.DropIndexRequest) returns (common.Status) {} + rpc GetIndexState(milvus.GetIndexStateRequest) returns (index.GetIndexStatesResponse) {} rpc AllocTimestamp(AllocTimestampRequest) returns (AllocTimestampResponse) {} rpc AllocID(AllocIDRequest) returns (AllocIDResponse) {} diff --git a/internal/proto/rootcoordpb/root_coord.pb.go b/internal/proto/rootcoordpb/root_coord.pb.go index 3535629ca8..cb4087b85b 100644 --- a/internal/proto/rootcoordpb/root_coord.pb.go +++ b/internal/proto/rootcoordpb/root_coord.pb.go @@ -10,6 +10,7 @@ import ( commonpb "github.com/milvus-io/milvus/internal/proto/commonpb" datapb "github.com/milvus-io/milvus/internal/proto/datapb" etcdpb "github.com/milvus-io/milvus/internal/proto/etcdpb" + indexpb "github.com/milvus-io/milvus/internal/proto/indexpb" internalpb "github.com/milvus-io/milvus/internal/proto/internalpb" milvuspb "github.com/milvus-io/milvus/internal/proto/milvuspb" proxypb "github.com/milvus-io/milvus/internal/proto/proxypb" @@ -675,108 +676,110 @@ func init() { func init() { proto.RegisterFile("root_coord.proto", fileDescriptor_4513485a144f6b06) } var fileDescriptor_4513485a144f6b06 = []byte{ - // 1614 bytes of a gzipped FileDescriptorProto + // 1637 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x5b, 0x73, 0xd3, 0x46, 0x14, 0xc6, 0x36, 0xb9, 0x1d, 0x3b, 0x71, 0xd8, 0x21, 0xe0, 0x1a, 0xda, 0x1a, 0x97, 0x82, 0xc3, 0xc5, 0x61, 0xc2, 0x0c, 0xa5, 0xbc, 0x91, 0x98, 0x06, 0x4f, 0xc9, 0x10, 0x64, 0xe8, 0xd0, 0x0b, - 0xe3, 0x6e, 0xa4, 0x83, 0xa3, 0x89, 0xac, 0x35, 0xda, 0x75, 0x2e, 0x6f, 0xed, 0x4c, 0xdf, 0xfb, - 0x9f, 0xda, 0x9f, 0xd2, 0x3f, 0xd2, 0x59, 0xad, 0xb4, 0x96, 0x64, 0xc9, 0x51, 0x80, 0x37, 0xef, - 0xea, 0xdb, 0xef, 0x3b, 0xfb, 0xed, 0xe5, 0x9c, 0x35, 0xac, 0x7a, 0x8c, 0x89, 0xbe, 0xc9, 0x98, - 0x67, 0xb5, 0x47, 0x1e, 0x13, 0x8c, 0x5c, 0x19, 0xda, 0xce, 0xd1, 0x98, 0xab, 0x56, 0x5b, 0x7e, - 0xf6, 0xbf, 0xd6, 0x2b, 0x26, 0x1b, 0x0e, 0x99, 0xab, 0xfa, 0xeb, 0x95, 0x28, 0xaa, 0xbe, 0x62, - 0xbb, 0x02, 0x3d, 0x97, 0x3a, 0x41, 0xbb, 0x3c, 0xf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x4c, 0x36, 0x76, 0x45, 0xad, 0xd4, 0x28, 0xb4, 0x96, 0x0d, 0xd5, + 0x68, 0xfe, 0x51, 0x80, 0x2b, 0x69, 0x05, 0x3e, 0x62, 0x2e, 0x47, 0xf2, 0x10, 0xe6, 0xb9, 0xa0, + 0x62, 0xcc, 0x03, 0x91, 0x6b, 0x99, 0x22, 0x3d, 0x1f, 0x62, 0x04, 0x50, 0x72, 0x1d, 0x96, 0x44, + 0xc8, 0x54, 0x2b, 0x36, 0x0a, 0xad, 0x8b, 0xc6, 0xa4, 0x43, 0x63, 0xc3, 0x5b, 0x58, 0xf1, 0x4d, + 0xe8, 0x76, 0x3e, 0xc3, 0xea, 0x8a, 0x71, 0x66, 0x07, 0xaa, 0x11, 0xf3, 0xa7, 0xac, 0x6a, 0x05, + 0x8a, 0xdd, 0x8e, 0x4f, 0x5d, 0x32, 0x8a, 0xdd, 0x8e, 0x66, 0x1d, 0x7f, 0x17, 0xa1, 0xd2, 0x1d, + 0x8e, 0x98, 0x27, 0x0c, 0xe4, 0x63, 0x47, 0x7c, 0x9c, 0xd6, 0x55, 0x58, 0x10, 0x94, 0x1f, 0xf6, + 0x6d, 0x2b, 0x10, 0x9c, 0x97, 0xcd, 0xae, 0x45, 0xbe, 0x86, 0xb2, 0xdc, 0x43, 0x2e, 0xb3, 0x50, + 0x0e, 0x96, 0xfc, 0x41, 0x08, 0xbb, 0xba, 0x16, 0x79, 0x04, 0x73, 0x92, 0x03, 0x6b, 0x17, 0x1b, + 0x85, 0xd6, 0xca, 0x66, 0x23, 0x53, 0x4d, 0x19, 0x28, 0x35, 0xd1, 0x50, 0x70, 0x52, 0x87, 0x45, + 0x8e, 0x83, 0x21, 0xba, 0x82, 0xd7, 0xe6, 0x1a, 0xa5, 0x56, 0xc9, 0x88, 0xda, 0xe4, 0x0b, 0x58, + 0xa4, 0x63, 0xc1, 0xfa, 0xb6, 0xc5, 0x6b, 0xf3, 0xfe, 0xd8, 0x82, 0x6c, 0x77, 0x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0x66, 0xe7, 0xb6, 0x38, 0x2e, 0xf6, 0x24, 0x0e, 0x04, 0xa4, 0x61, + 0x33, 0x05, 0x7c, 0xcb, 0x73, 0x08, 0x28, 0x5c, 0xa2, 0xa6, 0x56, 0xc2, 0xc8, 0xd9, 0xd8, 0x33, + 0x75, 0x79, 0x2e, 0x09, 0x3a, 0xa3, 0xa6, 0x4e, 0x61, 0xe3, 0x0f, 0xfc, 0xc0, 0xcf, 0x7b, 0x9e, + 0x7d, 0x64, 0x3b, 0x38, 0x40, 0xcd, 0x71, 0x4b, 0xc3, 0x72, 0xc6, 0x63, 0x1f, 0xca, 0x4a, 0x7c, + 0xc7, 0xa3, 0xae, 0x20, 0xb3, 0xfc, 0xe0, 0x23, 0x42, 0xda, 0xd6, 0xd9, 0xc0, 0x68, 0x11, 0x26, + 0x80, 0x3c, 0x83, 0x7b, 0xcc, 0xb1, 0xcd, 0xd3, 0x74, 0x99, 0x1e, 0xe5, 0xa1, 0x09, 0x44, 0x53, + 0xa6, 0x67, 0x22, 0x43, 0x91, 0xad, 0xc7, 0xbf, 0x3c, 0x1a, 0xd8, 0xe2, 0x60, 0xbc, 0x2f, 0x97, + 0xb8, 0xa1, 0x26, 0xde, 0xb7, 0x59, 0xf0, 0xb5, 0x11, 0x4e, 0xde, 0xf0, 0xb9, 0x36, 0xa2, 0xd3, + 0x3a, 0xda, 0xdf, 0x9f, 0xf7, 0xbb, 0x1e, 0xfe, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x19, 0xf1, + 0xf3, 0xdc, 0x1a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -858,6 +861,7 @@ type RootCoordClient interface { CreateIndex(ctx context.Context, in *milvuspb.CreateIndexRequest, opts ...grpc.CallOption) (*commonpb.Status, error) DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRequest, opts ...grpc.CallOption) (*milvuspb.DescribeIndexResponse, error) DropIndex(ctx context.Context, in *milvuspb.DropIndexRequest, opts ...grpc.CallOption) (*commonpb.Status, error) + GetIndexState(ctx context.Context, in *milvuspb.GetIndexStateRequest, opts ...grpc.CallOption) (*indexpb.GetIndexStatesResponse, error) AllocTimestamp(ctx context.Context, in *AllocTimestampRequest, opts ...grpc.CallOption) (*AllocTimestampResponse, error) AllocID(ctx context.Context, in *AllocIDRequest, opts ...grpc.CallOption) (*AllocIDResponse, error) UpdateChannelTimeTick(ctx context.Context, in *internalpb.ChannelTimeTickMsg, opts ...grpc.CallOption) (*commonpb.Status, error) @@ -1087,6 +1091,15 @@ func (c *rootCoordClient) DropIndex(ctx context.Context, in *milvuspb.DropIndexR return out, nil } +func (c *rootCoordClient) GetIndexState(ctx context.Context, in *milvuspb.GetIndexStateRequest, opts ...grpc.CallOption) (*indexpb.GetIndexStatesResponse, error) { + out := new(indexpb.GetIndexStatesResponse) + err := c.cc.Invoke(ctx, "/milvus.proto.rootcoord.RootCoord/GetIndexState", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *rootCoordClient) AllocTimestamp(ctx context.Context, in *AllocTimestampRequest, opts ...grpc.CallOption) (*AllocTimestampResponse, error) { out := new(AllocTimestampResponse) err := c.cc.Invoke(ctx, "/milvus.proto.rootcoord.RootCoord/AllocTimestamp", in, out, opts...) @@ -1381,6 +1394,7 @@ type RootCoordServer interface { CreateIndex(context.Context, *milvuspb.CreateIndexRequest) (*commonpb.Status, error) DescribeIndex(context.Context, *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) DropIndex(context.Context, *milvuspb.DropIndexRequest) (*commonpb.Status, error) + GetIndexState(context.Context, *milvuspb.GetIndexStateRequest) (*indexpb.GetIndexStatesResponse, error) AllocTimestamp(context.Context, *AllocTimestampRequest) (*AllocTimestampResponse, error) AllocID(context.Context, *AllocIDRequest) (*AllocIDResponse, error) UpdateChannelTimeTick(context.Context, *internalpb.ChannelTimeTickMsg) (*commonpb.Status, error) @@ -1480,6 +1494,9 @@ func (*UnimplementedRootCoordServer) DescribeIndex(ctx context.Context, req *mil func (*UnimplementedRootCoordServer) DropIndex(ctx context.Context, req *milvuspb.DropIndexRequest) (*commonpb.Status, error) { return nil, status.Errorf(codes.Unimplemented, "method DropIndex not implemented") } +func (*UnimplementedRootCoordServer) GetIndexState(ctx context.Context, req *milvuspb.GetIndexStateRequest) (*indexpb.GetIndexStatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIndexState not implemented") +} func (*UnimplementedRootCoordServer) AllocTimestamp(ctx context.Context, req *AllocTimestampRequest) (*AllocTimestampResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllocTimestamp not implemented") } @@ -1938,6 +1955,24 @@ func _RootCoord_DropIndex_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _RootCoord_GetIndexState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(milvuspb.GetIndexStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RootCoordServer).GetIndexState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.rootcoord.RootCoord/GetIndexState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RootCoordServer).GetIndexState(ctx, req.(*milvuspb.GetIndexStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _RootCoord_AllocTimestamp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AllocTimestampRequest) if err := dec(in); err != nil { @@ -2476,6 +2511,10 @@ var _RootCoord_serviceDesc = grpc.ServiceDesc{ MethodName: "DropIndex", Handler: _RootCoord_DropIndex_Handler, }, + { + MethodName: "GetIndexState", + Handler: _RootCoord_GetIndexState_Handler, + }, { MethodName: "AllocTimestamp", Handler: _RootCoord_AllocTimestamp_Handler, diff --git a/internal/proxy/rootcoord_mock_test.go b/internal/proxy/rootcoord_mock_test.go index c5c4dc2df4..30e8b49d37 100644 --- a/internal/proxy/rootcoord_mock_test.go +++ b/internal/proxy/rootcoord_mock_test.go @@ -24,6 +24,8 @@ import ( "sync/atomic" "time" + "github.com/milvus-io/milvus/internal/proto/indexpb" + "github.com/milvus-io/milvus/internal/common" "github.com/milvus-io/milvus/internal/types" @@ -752,6 +754,24 @@ func (coord *RootCoordMock) DescribeIndex(ctx context.Context, req *milvuspb.Des }, nil } +func (coord *RootCoordMock) GetIndexState(ctx context.Context, req *milvuspb.GetIndexStateRequest) (*indexpb.GetIndexStatesResponse, error) { + code := coord.state.Load().(internalpb.StateCode) + if code != internalpb.StateCode_Healthy { + return &indexpb.GetIndexStatesResponse{ + Status: &commonpb.Status{ + ErrorCode: commonpb.ErrorCode_UnexpectedError, + Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]), + }, + }, nil + } + return &indexpb.GetIndexStatesResponse{ + Status: &commonpb.Status{ + ErrorCode: commonpb.ErrorCode_Success, + Reason: "", + }, + }, nil +} + func (coord *RootCoordMock) DropIndex(ctx context.Context, req *milvuspb.DropIndexRequest) (*commonpb.Status, error) { code := coord.state.Load().(internalpb.StateCode) if code != internalpb.StateCode_Healthy { @@ -1068,6 +1088,7 @@ type ShowSegmentsFunc func(ctx context.Context, request *milvuspb.ShowSegmentsRe type DescribeSegmentsFunc func(ctx context.Context, request *rootcoordpb.DescribeSegmentsRequest) (*rootcoordpb.DescribeSegmentsResponse, error) type ImportFunc func(ctx context.Context, req *milvuspb.ImportRequest) (*milvuspb.ImportResponse, error) type DropCollectionFunc func(ctx context.Context, request *milvuspb.DropCollectionRequest) (*commonpb.Status, error) +type GetIndexStateFunc func(ctx context.Context, request *milvuspb.GetIndexStateRequest) (*indexpb.GetIndexStatesResponse, error) type mockRootCoord struct { types.RootCoord @@ -1078,6 +1099,7 @@ type mockRootCoord struct { DescribeSegmentsFunc ImportFunc DropCollectionFunc + GetIndexStateFunc } func (m *mockRootCoord) DescribeCollection(ctx context.Context, request *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) { @@ -1129,6 +1151,13 @@ func (m *mockRootCoord) DropCollection(ctx context.Context, request *milvuspb.Dr return nil, errors.New("mock") } +func (m *mockRootCoord) GetIndexState(ctx context.Context, request *milvuspb.GetIndexStateRequest) (*indexpb.GetIndexStatesResponse, error) { + if m.GetIndexStateFunc != nil { + return m.GetIndexStateFunc(ctx, request) + } + return nil, errors.New("mock") +} + func newMockRootCoord() *mockRootCoord { return &mockRootCoord{} } diff --git a/internal/proxy/task.go b/internal/proxy/task.go index d326b65e08..48a23b3497 100644 --- a/internal/proxy/task.go +++ b/internal/proxy/task.go @@ -24,7 +24,7 @@ import ( "strconv" "strings" - "github.com/milvus-io/milvus/internal/proto/rootcoordpb" + "github.com/milvus-io/milvus/internal/proto/indexpb" "github.com/golang/protobuf/proto" "go.uber.org/zap" @@ -38,7 +38,6 @@ import ( "github.com/milvus-io/milvus/internal/proto/commonpb" "github.com/milvus-io/milvus/internal/proto/datapb" - "github.com/milvus-io/milvus/internal/proto/indexpb" "github.com/milvus-io/milvus/internal/proto/internalpb" "github.com/milvus-io/milvus/internal/proto/milvuspb" "github.com/milvus-io/milvus/internal/proto/planpb" @@ -2379,155 +2378,16 @@ func (gist *getIndexStateTask) PreExecute(ctx context.Context) error { return nil } -func (gist *getIndexStateTask) getPartitions(ctx context.Context, collectionName string, collectionID UniqueID) (*milvuspb.ShowPartitionsResponse, error) { - showPartitionRequest := &milvuspb.ShowPartitionsRequest{ - Base: &commonpb.MsgBase{ - MsgType: commonpb.MsgType_ShowPartitions, - MsgID: gist.Base.MsgID, - Timestamp: gist.Base.Timestamp, - SourceID: Params.ProxyCfg.GetNodeID(), - }, - DbName: gist.DbName, - CollectionName: collectionName, - CollectionID: collectionID, - } - ret, err := gist.rootCoord.ShowPartitions(ctx, showPartitionRequest) - if err != nil { - return nil, err - } - if ret.GetStatus().GetErrorCode() != commonpb.ErrorCode_Success { - return nil, errors.New(ret.GetStatus().GetReason()) - } - return ret, nil -} - -func (gist *getIndexStateTask) describeIndex(ctx context.Context) (*milvuspb.DescribeIndexResponse, error) { - describeIndexReq := milvuspb.DescribeIndexRequest{ - Base: &commonpb.MsgBase{ - MsgType: commonpb.MsgType_DescribeIndex, - MsgID: gist.Base.MsgID, - Timestamp: gist.Base.Timestamp, - SourceID: Params.ProxyCfg.GetNodeID(), - }, - DbName: gist.DbName, - CollectionName: gist.CollectionName, - IndexName: gist.IndexName, - } - ret, err := gist.rootCoord.DescribeIndex(ctx, &describeIndexReq) - if err != nil { - return nil, err - } - if ret.GetStatus().GetErrorCode() != commonpb.ErrorCode_Success { - return nil, errors.New(ret.GetStatus().GetReason()) - } - return ret, nil -} - -func (gist *getIndexStateTask) getSegmentIDs(ctx context.Context, collectionID UniqueID, partitions *milvuspb.ShowPartitionsResponse) ([]UniqueID, error) { - var allSegmentIDs []UniqueID - for _, partitionID := range partitions.PartitionIDs { - showSegmentsRequest := &milvuspb.ShowSegmentsRequest{ - Base: &commonpb.MsgBase{ - MsgType: commonpb.MsgType_ShowSegments, - MsgID: gist.Base.MsgID, - Timestamp: gist.Base.Timestamp, - SourceID: Params.ProxyCfg.GetNodeID(), - }, - CollectionID: collectionID, - PartitionID: partitionID, - } - segments, err := gist.rootCoord.ShowSegments(ctx, showSegmentsRequest) - if err != nil { - return nil, err - } - if segments.Status.ErrorCode != commonpb.ErrorCode_Success { - return nil, errors.New(segments.Status.Reason) - } - allSegmentIDs = append(allSegmentIDs, segments.SegmentIDs...) - } - return allSegmentIDs, nil -} - -func (gist *getIndexStateTask) getIndexBuildIDs(ctx context.Context, collectionID UniqueID, allSegmentIDs []UniqueID, indexID UniqueID) ([]UniqueID, error) { - indexBuildIDs := make([]UniqueID, 0) - segmentsDesc, err := gist.rootCoord.DescribeSegments(ctx, &rootcoordpb.DescribeSegmentsRequest{ - Base: &commonpb.MsgBase{ - MsgType: commonpb.MsgType_DescribeSegments, - MsgID: gist.Base.MsgID, - Timestamp: gist.Base.Timestamp, - SourceID: Params.ProxyCfg.GetNodeID(), - }, - CollectionID: collectionID, - SegmentIDs: allSegmentIDs, - }) - if err != nil { - return nil, err - } - - if segmentsDesc.GetStatus().GetErrorCode() != commonpb.ErrorCode_Success { - return nil, errors.New(segmentsDesc.GetStatus().GetReason()) - } - for _, segmentDesc := range segmentsDesc.GetSegmentInfos() { - for _, segmentIndexInfo := range segmentDesc.GetIndexInfos() { - if segmentIndexInfo.IndexID == indexID && segmentIndexInfo.EnableIndex { - indexBuildIDs = append(indexBuildIDs, segmentIndexInfo.GetBuildID()) - } - } - } - return indexBuildIDs, nil -} - func (gist *getIndexStateTask) Execute(ctx context.Context) error { - collectionName := gist.CollectionName - collectionID, err := globalMetaCache.GetCollectionID(ctx, collectionName) - if err != nil { // err is not nil if collection not exists - return err - } - gist.collectionID = collectionID - - // Get partition result for the given collection. - partitions, err := gist.getPartitions(ctx, collectionName, collectionID) - if err != nil { - return err - } if gist.IndexName == "" { gist.IndexName = Params.CommonCfg.DefaultIndexName } - - // Retrieve index status and detailed index information. - indexDescriptionResp, err := gist.describeIndex(ctx) + states, err := gist.rootCoord.GetIndexState(ctx, gist.GetIndexStateRequest) if err != nil { return err } - // Check if the target index name exists. - matchIndexID := int64(-1) - foundIndexID := false - for _, desc := range indexDescriptionResp.IndexDescriptions { - if desc.IndexName == gist.IndexName { - matchIndexID = desc.IndexID - foundIndexID = true - break - } - } - if !foundIndexID { - return fmt.Errorf("no index is created") - } - - // Fetch segments for partitions. - allSegmentIDs, err := gist.getSegmentIDs(ctx, collectionID, partitions) - if err != nil { - return err - } - - // Get all index build ids. - indexBuildIDs, err := gist.getIndexBuildIDs(ctx, collectionID, allSegmentIDs, matchIndexID) - if err != nil { - return err - } - log.Debug("get index state", zap.String("role", typeutil.ProxyRole), zap.Int64s("indexBuildIDs", indexBuildIDs)) - gist.result = &milvuspb.GetIndexStateResponse{ Status: &commonpb.Status{ ErrorCode: commonpb.ErrorCode_Success, @@ -2537,19 +2397,6 @@ func (gist *getIndexStateTask) Execute(ctx context.Context) error { FailReason: "", } - if len(indexBuildIDs) <= 0 { - return nil - } - - // Get index states. - getIndexStatesRequest := &indexpb.GetIndexStatesRequest{ - IndexBuildIDs: indexBuildIDs, - } - states, err := gist.indexCoord.GetIndexStates(ctx, getIndexStatesRequest) - if err != nil { - return err - } - if states.Status.ErrorCode != commonpb.ErrorCode_Success { gist.result = &milvuspb.GetIndexStateResponse{ Status: states.Status, @@ -2559,6 +2406,9 @@ func (gist *getIndexStateTask) Execute(ctx context.Context) error { } for _, state := range states.States { + if state.State == commonpb.IndexState_IndexStateNone { + continue + } if state.State != commonpb.IndexState_Finished { gist.result = &milvuspb.GetIndexStateResponse{ Status: states.Status, diff --git a/internal/proxy/task_index_test.go b/internal/proxy/task_index_test.go index e05d57241a..9865b43f2d 100644 --- a/internal/proxy/task_index_test.go +++ b/internal/proxy/task_index_test.go @@ -20,20 +20,12 @@ import ( "context" "testing" - "github.com/milvus-io/milvus/internal/proto/schemapb" - "github.com/milvus-io/milvus/internal/proto/indexpb" - "github.com/milvus-io/milvus/internal/proto/etcdpb" - - "github.com/milvus-io/milvus/internal/proto/rootcoordpb" - "github.com/milvus-io/milvus/internal/proto/commonpb" - - "github.com/stretchr/testify/assert" - "github.com/milvus-io/milvus/internal/proto/milvuspb" "github.com/milvus-io/milvus/internal/util/funcutil" + "github.com/stretchr/testify/assert" ) func TestGetIndexStateTask_Execute(t *testing.T) { @@ -43,10 +35,6 @@ func TestGetIndexStateTask_Execute(t *testing.T) { fieldName := funcutil.GenRandomStr() indexName := "" ctx := context.Background() - partitions := []UniqueID{2} - indexID := UniqueID(3) - segmentID := UniqueID(4) - indexBuildID := UniqueID(5) rootCoord := newMockRootCoord() indexCoord := newMockIndexCoord() @@ -74,135 +62,22 @@ func TestGetIndexStateTask_Execute(t *testing.T) { // failed to get collection id. _ = InitMetaCache(rootCoord, queryCoord, shardMgr) assert.Error(t, gist.Execute(ctx)) - rootCoord.DescribeCollectionFunc = func(ctx context.Context, request *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) { - return &milvuspb.DescribeCollectionResponse{ - Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, - Schema: &schemapb.CollectionSchema{}, - CollectionID: collectionID, - }, nil - } - - // failed to show partitions. - assert.Error(t, gist.Execute(ctx)) - rootCoord.ShowPartitionsFunc = func(ctx context.Context, request *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) { - return &milvuspb.ShowPartitionsResponse{ - Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UnexpectedError, Reason: "mock"}, - PartitionIDs: partitions, - }, nil - } - assert.Error(t, gist.Execute(ctx)) - rootCoord.ShowPartitionsFunc = func(ctx context.Context, request *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) { - return &milvuspb.ShowPartitionsResponse{ - Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, - PartitionIDs: partitions, - }, nil - } - - // failed to describe index. - assert.Error(t, gist.Execute(ctx)) - rootCoord.DescribeIndexFunc = func(ctx context.Context, request *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) { - return &milvuspb.DescribeIndexResponse{ - Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UnexpectedError, Reason: "mock"}, - IndexDescriptions: nil, - }, nil - } - assert.Error(t, gist.Execute(ctx)) - - // no index is created. - rootCoord.DescribeIndexFunc = func(ctx context.Context, request *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) { - return &milvuspb.DescribeIndexResponse{ - Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, - IndexDescriptions: nil, - }, nil - } - assert.Error(t, gist.Execute(ctx)) - rootCoord.DescribeIndexFunc = func(ctx context.Context, request *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) { - return &milvuspb.DescribeIndexResponse{ - Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, - IndexDescriptions: []*milvuspb.IndexDescription{ - { - IndexName: Params.CommonCfg.DefaultIndexName, - IndexID: indexID, - Params: nil, - FieldName: fieldName, - }, - }, - }, nil - } - - // failed to get segment ids. - assert.Error(t, gist.Execute(ctx)) - rootCoord.ShowSegmentsFunc = func(ctx context.Context, request *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) { - return &milvuspb.ShowSegmentsResponse{ - Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UnexpectedError, Reason: "mock"}, - }, nil - } - assert.Error(t, gist.Execute(ctx)) - rootCoord.ShowSegmentsFunc = func(ctx context.Context, request *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) { - return &milvuspb.ShowSegmentsResponse{ - Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, - SegmentIDs: []UniqueID{segmentID}, - }, nil - } - - // failed to get index build ids. - assert.Error(t, gist.Execute(ctx)) - rootCoord.DescribeSegmentsFunc = func(ctx context.Context, request *rootcoordpb.DescribeSegmentsRequest) (*rootcoordpb.DescribeSegmentsResponse, error) { - return &rootcoordpb.DescribeSegmentsResponse{ - Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UnexpectedError, Reason: "mock"}, - }, nil - } - assert.Error(t, gist.Execute(ctx)) - rootCoord.DescribeSegmentsFunc = func(ctx context.Context, request *rootcoordpb.DescribeSegmentsRequest) (*rootcoordpb.DescribeSegmentsResponse, error) { - return &rootcoordpb.DescribeSegmentsResponse{ - Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, - SegmentInfos: map[int64]*rootcoordpb.SegmentInfos{ - segmentID: { - IndexInfos: []*etcdpb.SegmentIndexInfo{ - { - IndexID: indexID, - EnableIndex: true, - BuildID: indexBuildID, - }, - }, - }, - }, - }, nil - } - - // failed to get index states. - assert.Error(t, gist.Execute(ctx)) - indexCoord.GetIndexStatesFunc = func(ctx context.Context, request *indexpb.GetIndexStatesRequest) (*indexpb.GetIndexStatesResponse, error) { - return &indexpb.GetIndexStatesResponse{ - Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UnexpectedError, Reason: "mock"}, - }, nil - } - - // normal case. - assert.NoError(t, gist.Execute(ctx)) - assert.Equal(t, commonpb.IndexState_Failed, gist.result.GetState()) - indexCoord.GetIndexStatesFunc = func(ctx context.Context, request *indexpb.GetIndexStatesRequest) (*indexpb.GetIndexStatesResponse, error) { + rootCoord.GetIndexStateFunc = func(ctx context.Context, request *milvuspb.GetIndexStateRequest) (*indexpb.GetIndexStatesResponse, error) { return &indexpb.GetIndexStatesResponse{ Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, States: []*indexpb.IndexInfo{ { - State: commonpb.IndexState_Unissued, + State: commonpb.IndexState_Finished, + Reason: "", }, - }, - }, nil - } - assert.NoError(t, gist.Execute(ctx)) - assert.Equal(t, commonpb.IndexState_Unissued, gist.result.GetState()) - indexCoord.GetIndexStatesFunc = func(ctx context.Context, request *indexpb.GetIndexStatesRequest) (*indexpb.GetIndexStatesResponse, error) { - return &indexpb.GetIndexStatesResponse{ - Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, - States: []*indexpb.IndexInfo{ { - State: commonpb.IndexState_Finished, + State: commonpb.IndexState_IndexStateNone, + Reason: "", }, }, }, nil } + assert.NoError(t, gist.Execute(ctx)) assert.Equal(t, commonpb.IndexState_Finished, gist.result.GetState()) } diff --git a/internal/rootcoord/meta_table.go b/internal/rootcoord/meta_table.go index dec68b0c95..0dc7931f02 100644 --- a/internal/rootcoord/meta_table.go +++ b/internal/rootcoord/meta_table.go @@ -939,6 +939,40 @@ func (mt *MetaTable) DropIndex(collName, fieldName, indexName string) (typeutil. return dropIdxID, true, nil } +func (mt *MetaTable) GetInitBuildIDs(collName, indexName string) ([]UniqueID, error) { + mt.ddLock.RLock() + defer mt.ddLock.RUnlock() + + collMeta, err := mt.unlockGetCollectionInfo(collName) + if err != nil { + return nil, err + } + + var indexID typeutil.UniqueID + for _, info := range collMeta.FieldIndexes { + idxMeta, ok := mt.indexID2Meta[info.IndexID] + if ok && idxMeta.IndexName == indexName { + indexID = info.IndexID + break + } + } + + if indexID == 0 { + log.Warn("get init buildIDs, index not found", zap.String("collection name", collName), + zap.String("index name", indexName)) + return nil, fmt.Errorf("index not found with name = %s in collection %s", indexName, collName) + } + + initBuildIDs := make([]UniqueID, 0) + for _, indexID2Info := range mt.segID2IndexMeta { + segIndexInfo, ok := indexID2Info[indexID] + if ok && segIndexInfo.EnableIndex && !segIndexInfo.ByAutoFlush { + initBuildIDs = append(initBuildIDs, segIndexInfo.BuildID) + } + } + return initBuildIDs, nil +} + // GetSegmentIndexInfoByID return segment index info by segment id func (mt *MetaTable) GetSegmentIndexInfoByID(segID typeutil.UniqueID, fieldID int64, idxName string) (pb.SegmentIndexInfo, error) { mt.ddLock.RLock() diff --git a/internal/rootcoord/meta_table_test.go b/internal/rootcoord/meta_table_test.go index 0b287784c9..61ed5635ec 100644 --- a/internal/rootcoord/meta_table_test.go +++ b/internal/rootcoord/meta_table_test.go @@ -1508,3 +1508,83 @@ func TestMetaTable_checkFieldIndexDuplicate(t *testing.T) { assert.False(t, duplicate) }) } + +func TestMetaTable_GetInitBuildIDs(t *testing.T) { + var ( + collName = "GetInitBuildID-Coll" + indexName = "GetInitBuildID-Index" + ) + mt := &MetaTable{ + collID2Meta: map[typeutil.UniqueID]pb.CollectionInfo{ + 1: { + FieldIndexes: []*pb.FieldIndexInfo{ + { + FiledID: 1, + IndexID: 1, + }, + { + FiledID: 2, + IndexID: 2, + }, + { + FiledID: 3, + IndexID: 3, + }, + }, + }, + }, + collName2ID: map[string]typeutil.UniqueID{ + "GetInitBuildID-Coll-1": 2, + }, + indexID2Meta: map[typeutil.UniqueID]pb.IndexInfo{ + 1: { + IndexName: "GetInitBuildID-Index-1", + IndexID: 1, + }, + 2: { + IndexName: "GetInitBuildID-Index-2", + IndexID: 2, + }, + }, + } + t.Run("coll not exist", func(t *testing.T) { + buildIDs, err := mt.GetInitBuildIDs("collName", indexName) + assert.Error(t, err) + assert.Nil(t, buildIDs) + }) + + mt.collName2ID[collName] = 1 + + t.Run("index not exist", func(t *testing.T) { + buildIDs, err := mt.GetInitBuildIDs(collName, indexName) + assert.Error(t, err) + assert.Nil(t, buildIDs) + }) + + mt.indexID2Meta[3] = pb.IndexInfo{ + IndexName: indexName, + IndexID: 3, + } + + mt.segID2IndexMeta = map[typeutil.UniqueID]map[typeutil.UniqueID]pb.SegmentIndexInfo{ + 4: { + 1: { + IndexID: 1, + EnableIndex: true, + }, + }, + 5: { + 3: { + IndexID: 3, + EnableIndex: true, + ByAutoFlush: false, + }, + }, + } + + t.Run("success", func(t *testing.T) { + buildIDs, err := mt.GetInitBuildIDs(collName, indexName) + assert.NoError(t, err) + assert.Equal(t, 1, len(buildIDs)) + }) +} diff --git a/internal/rootcoord/root_coord.go b/internal/rootcoord/root_coord.go index 0f6453a029..8e988dcb42 100644 --- a/internal/rootcoord/root_coord.go +++ b/internal/rootcoord/root_coord.go @@ -420,6 +420,7 @@ func (c *Core) checkFlushedSegments(ctx context.Context) { FieldID: idxInfo.FiledID, IndexID: idxInfo.IndexID, EnableIndex: false, + ByAutoFlush: true, } log.Debug("building index by background checker", zap.Int64("segment_id", segID), @@ -1841,6 +1842,50 @@ func (c *Core) DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRequ return t.Rsp, nil } +func (c *Core) GetIndexState(ctx context.Context, in *milvuspb.GetIndexStateRequest) (*indexpb.GetIndexStatesResponse, error) { + if code, ok := c.checkHealthy(); !ok { + log.Error("RootCoord GetIndexState failed, RootCoord is not healthy") + return &indexpb.GetIndexStatesResponse{ + Status: failStatus(commonpb.ErrorCode_UnexpectedError, "StateCode="+internalpb.StateCode_name[int32(code)]), + }, nil + } + log.Info("RootCoord GetIndexState", zap.String("collName", in.GetCollectionName()), + zap.String("fieldName", in.GetFieldName()), zap.String("indexName", in.GetIndexName())) + + // initBuildIDs are the buildIDs generated when CreateIndex is called. + initBuildIDs, err := c.MetaTable.GetInitBuildIDs(in.GetCollectionName(), in.GetIndexName()) + if err != nil { + log.Error("RootCoord GetIndexState failed", zap.String("collName", in.GetCollectionName()), + zap.String("fieldName", in.GetFieldName()), zap.String("indexName", in.GetIndexName()), zap.Error(err)) + return &indexpb.GetIndexStatesResponse{ + Status: failStatus(commonpb.ErrorCode_UnexpectedError, err.Error()), + }, nil + } + + ret := &indexpb.GetIndexStatesResponse{ + Status: succStatus(), + } + if len(initBuildIDs) == 0 { + log.Warn("RootCoord GetIndexState successful, all segments generated when CreateIndex is called have been compacted") + return ret, nil + } + + states, err := c.CallGetIndexStatesService(ctx, initBuildIDs) + if err != nil { + log.Error("RootCoord GetIndexState CallGetIndexStatesService failed", zap.String("collName", in.GetCollectionName()), + zap.String("fieldName", in.GetFieldName()), zap.String("indexName", in.GetIndexName()), zap.Error(err)) + ret.Status = failStatus(commonpb.ErrorCode_UnexpectedError, err.Error()) + return ret, err + } + + log.Info("RootCoord GetIndexState successful", zap.String("collName", in.GetCollectionName()), + zap.String("fieldName", in.GetFieldName()), zap.String("indexName", in.GetIndexName())) + return &indexpb.GetIndexStatesResponse{ + Status: succStatus(), + States: states, + }, nil +} + // DropIndex drop index func (c *Core) DropIndex(ctx context.Context, in *milvuspb.DropIndexRequest) (*commonpb.Status, error) { metrics.RootCoordDDLReqCounter.WithLabelValues("DropIndex", metrics.TotalLabel).Inc() @@ -2158,6 +2203,7 @@ func (c *Core) SegmentFlushCompleted(ctx context.Context, in *datapb.SegmentFlus FieldID: fieldSch.FieldID, IndexID: idxInfo.IndexID, EnableIndex: false, + ByAutoFlush: true, } info.BuildID, err = c.BuildIndex(ctx, segID, in.Segment.GetNumOfRows(), in.Segment.GetBinlogs(), fieldSch, idxInfo, true) if err == nil && info.BuildID != 0 { diff --git a/internal/rootcoord/root_coord_test.go b/internal/rootcoord/root_coord_test.go index 853f694aa1..7eba86e6bc 100644 --- a/internal/rootcoord/root_coord_test.go +++ b/internal/rootcoord/root_coord_test.go @@ -3486,3 +3486,108 @@ func TestCore_getCollectionName(t *testing.T) { assert.Equal(t, "dummy", collName) assert.Equal(t, "p2", partName) } + +func TestCore_GetIndexState(t *testing.T) { + var ( + collName = "collName" + fieldName = "fieldName" + indexName = "indexName" + ) + mt := &MetaTable{ + ddLock: sync.RWMutex{}, + collID2Meta: map[typeutil.UniqueID]etcdpb.CollectionInfo{ + 1: { + FieldIndexes: []*etcdpb.FieldIndexInfo{ + { + FiledID: 1, + IndexID: 1, + }, + }, + }, + }, + collName2ID: map[string]typeutil.UniqueID{ + collName: 2, + }, + indexID2Meta: map[typeutil.UniqueID]etcdpb.IndexInfo{ + 1: { + IndexID: 1, + IndexName: indexName, + }, + }, + segID2IndexMeta: map[typeutil.UniqueID]map[typeutil.UniqueID]etcdpb.SegmentIndexInfo{ + 3: { + 1: { + SegmentID: 3, + BuildID: 1, + EnableIndex: false, + }, + }, + }, + } + + core := &Core{ + MetaTable: mt, + } + req := &milvuspb.GetIndexStateRequest{ + CollectionName: collName, + FieldName: fieldName, + IndexName: indexName, + } + core.stateCode.Store(internalpb.StateCode_Abnormal) + + t.Run("core not healthy", func(t *testing.T) { + resp, err := core.GetIndexState(context.Background(), req) + assert.Nil(t, err) + assert.Equal(t, commonpb.ErrorCode_UnexpectedError, resp.Status.GetErrorCode()) + }) + + core.stateCode.Store(internalpb.StateCode_Healthy) + + t.Run("get init buildiDs failed", func(t *testing.T) { + resp, err := core.GetIndexState(context.Background(), req) + assert.Nil(t, err) + assert.Equal(t, commonpb.ErrorCode_UnexpectedError, resp.Status.GetErrorCode()) + }) + + core.MetaTable.collName2ID[collName] = 1 + + t.Run("number of buildIDs is zero", func(t *testing.T) { + core.CallGetIndexStatesService = func(ctx context.Context, IndexBuildIDs []int64) ([]*indexpb.IndexInfo, error) { + return []*indexpb.IndexInfo{}, nil + } + resp, err := core.GetIndexState(context.Background(), req) + assert.NoError(t, err) + assert.Equal(t, commonpb.ErrorCode_Success, resp.Status.GetErrorCode()) + }) + + t.Run("CallGetIndexStatesService failed", func(t *testing.T) { + core.MetaTable.segID2IndexMeta[3] = map[typeutil.UniqueID]etcdpb.SegmentIndexInfo{ + 1: { + SegmentID: 3, + BuildID: 1, + EnableIndex: true, + }, + } + core.CallGetIndexStatesService = func(ctx context.Context, IndexBuildIDs []int64) ([]*indexpb.IndexInfo, error) { + return nil, errors.New("error occurred") + } + + resp, err := core.GetIndexState(context.Background(), req) + assert.Error(t, err) + assert.Equal(t, commonpb.ErrorCode_UnexpectedError, resp.Status.GetErrorCode()) + }) + + t.Run("success", func(t *testing.T) { + core.CallGetIndexStatesService = func(ctx context.Context, IndexBuildIDs []int64) ([]*indexpb.IndexInfo, error) { + return []*indexpb.IndexInfo{ + { + State: commonpb.IndexState_Finished, + IndexBuildID: 1, + }, + }, nil + } + resp, err := core.GetIndexState(context.Background(), req) + assert.NoError(t, err) + assert.Equal(t, commonpb.ErrorCode_Success, resp.Status.GetErrorCode()) + }) +} diff --git a/internal/rootcoord/task.go b/internal/rootcoord/task.go index c5fbd201c7..ded6389ed7 100644 --- a/internal/rootcoord/task.go +++ b/internal/rootcoord/task.go @@ -986,6 +986,7 @@ func (t *CreateIndexReqTask) Execute(ctx context.Context) error { FieldID: field.FieldID, IndexID: idxInfo.IndexID, EnableIndex: false, + ByAutoFlush: false, } info.BuildID, err = t.core.BuildIndex(ctx, segID, segID2Binlog[segID].GetNumOfRows(), segID2Binlog[segID].GetFieldBinlogs(), &field, idxInfo, false) if err != nil { diff --git a/internal/types/types.go b/internal/types/types.go index 012eff2ed4..9f08c6b946 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -495,6 +495,8 @@ type RootCoord interface { // error is always nil DescribeIndex(ctx context.Context, req *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) + GetIndexState(ctx context.Context, req *milvuspb.GetIndexStateRequest) (*indexpb.GetIndexStatesResponse, error) + // DropIndex notifies RootCoord to drop the specified index for the specified field // // ctx is the context to control request deadline and cancellation diff --git a/internal/util/mock/grpc_rootcoord_client.go b/internal/util/mock/grpc_rootcoord_client.go index 7ddd9b9a2f..82bab42efb 100644 --- a/internal/util/mock/grpc_rootcoord_client.go +++ b/internal/util/mock/grpc_rootcoord_client.go @@ -19,6 +19,8 @@ package mock import ( "context" + "github.com/milvus-io/milvus/internal/proto/indexpb" + "google.golang.org/grpc" "github.com/milvus-io/milvus/internal/proto/commonpb" @@ -149,6 +151,10 @@ func (m *GrpcRootCoordClient) DescribeIndex(ctx context.Context, in *milvuspb.De return &milvuspb.DescribeIndexResponse{}, m.Err } +func (m *GrpcRootCoordClient) GetIndexState(ctx context.Context, in *milvuspb.GetIndexStateRequest, opt ...grpc.CallOption) (*indexpb.GetIndexStatesResponse, error) { + return &indexpb.GetIndexStatesResponse{}, m.Err +} + func (m *GrpcRootCoordClient) DropIndex(ctx context.Context, in *milvuspb.DropIndexRequest, opts ...grpc.CallOption) (*commonpb.Status, error) { return &commonpb.Status{}, m.Err }