mirror of https://github.com/milvus-io/milvus.git
Signed-off-by: longjiquan <jiquan.long@zilliz.com>pull/21672/head
parent
04e595d61b
commit
bd50e1e0e2
3
Makefile
3
Makefile
|
@ -293,6 +293,9 @@ rpm: install
|
|||
mock-datanode:
|
||||
mockery --name=DataNode --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datanode.go --with-expecter
|
||||
|
||||
mock-rootcoord:
|
||||
mockery --name=RootCoord --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_rootcoord.go --with-expecter
|
||||
|
||||
mock-tnx-kv:
|
||||
mockery --name=TxnKV --dir=$(PWD)/internal/kv --output=$(PWD)/internal/kv/mocks --filename=TxnKV.go --with-expecter
|
||||
|
||||
|
|
|
@ -119,3 +119,22 @@ func IsCollectionNotExistError(e error) bool {
|
|||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func IsCollectionNotExistErrorV2(e error) bool {
|
||||
statusError, ok := e.(*statusError)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return statusError.GetErrorCode() == commonpb.ErrorCode_CollectionNotExists
|
||||
}
|
||||
|
||||
func StatusFromError(e error) *commonpb.Status {
|
||||
if e == nil {
|
||||
return &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}
|
||||
}
|
||||
statusError, ok := e.(*statusError)
|
||||
if !ok {
|
||||
return &commonpb.Status{ErrorCode: commonpb.ErrorCode_UnexpectedError, Reason: e.Error()}
|
||||
}
|
||||
return &commonpb.Status{ErrorCode: statusError.GetErrorCode(), Reason: statusError.GetReason()}
|
||||
}
|
||||
|
|
|
@ -61,3 +61,21 @@ func Test_IsCollectionNotExistError(t *testing.T) {
|
|||
assert.True(t, IsCollectionNotExistError(NewCollectionNotExistError("collection not exist")))
|
||||
assert.False(t, IsCollectionNotExistError(NewStatusError(commonpb.ErrorCode_BuildIndexError, "")))
|
||||
}
|
||||
|
||||
func TestIsCollectionNotExistErrorV2(t *testing.T) {
|
||||
assert.False(t, IsCollectionNotExistErrorV2(nil))
|
||||
assert.False(t, IsCollectionNotExistErrorV2(errors.New("not status error")))
|
||||
assert.True(t, IsCollectionNotExistErrorV2(NewCollectionNotExistError("collection not exist")))
|
||||
assert.False(t, IsCollectionNotExistErrorV2(NewStatusError(commonpb.ErrorCode_BuildIndexError, "")))
|
||||
}
|
||||
|
||||
func TestStatusFromError(t *testing.T) {
|
||||
var status *commonpb.Status
|
||||
status = StatusFromError(nil)
|
||||
assert.Equal(t, commonpb.ErrorCode_Success, status.GetErrorCode())
|
||||
status = StatusFromError(errors.New("not status error"))
|
||||
assert.Equal(t, commonpb.ErrorCode_UnexpectedError, status.GetErrorCode())
|
||||
assert.Equal(t, "not status error", status.GetReason())
|
||||
status = StatusFromError(NewCollectionNotExistError("collection not exist"))
|
||||
assert.Equal(t, commonpb.ErrorCode_CollectionNotExists, status.GetErrorCode())
|
||||
}
|
||||
|
|
|
@ -408,6 +408,7 @@ func (t *compactionTrigger) handleSignal(signal *compactionSignal) {
|
|||
isDiskIndex, err := t.updateSegmentMaxSize(segments)
|
||||
if err != nil {
|
||||
log.Warn("failed to update segment max size", zap.Error(err))
|
||||
return
|
||||
}
|
||||
|
||||
ts, err := t.allocTs()
|
||||
|
|
|
@ -442,6 +442,10 @@ func (m *mockRootCoordService) DescribeCollection(ctx context.Context, req *milv
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (m *mockRootCoordService) DescribeCollectionInternal(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
return m.DescribeCollection(ctx, req)
|
||||
}
|
||||
|
||||
func (m *mockRootCoordService) ShowCollections(ctx context.Context, req *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
|
||||
return &milvuspb.ShowCollectionsResponse{
|
||||
Status: &commonpb.Status{
|
||||
|
@ -479,6 +483,10 @@ func (m *mockRootCoordService) ShowPartitions(ctx context.Context, req *milvuspb
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (m *mockRootCoordService) ShowPartitionsInternal(ctx context.Context, req *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
return m.ShowPartitions(ctx, req)
|
||||
}
|
||||
|
||||
//global timestamp allocator
|
||||
func (m *mockRootCoordService) AllocTimestamp(ctx context.Context, req *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error) {
|
||||
if m.state != commonpb.StateCode_Healthy {
|
||||
|
|
|
@ -863,7 +863,7 @@ func (s *Server) stopServerLoop() {
|
|||
// loadCollectionFromRootCoord communicates with RootCoord and asks for collection information.
|
||||
// collection information will be added to server meta info.
|
||||
func (s *Server) loadCollectionFromRootCoord(ctx context.Context, collectionID int64) error {
|
||||
resp, err := s.rootCoordClient.DescribeCollection(ctx, &milvuspb.DescribeCollectionRequest{
|
||||
resp, err := s.rootCoordClient.DescribeCollectionInternal(ctx, &milvuspb.DescribeCollectionRequest{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType_DescribeCollection),
|
||||
commonpbutil.WithSourceID(Params.DataCoordCfg.GetNodeID()),
|
||||
|
@ -874,7 +874,7 @@ func (s *Server) loadCollectionFromRootCoord(ctx context.Context, collectionID i
|
|||
if err = VerifyResponse(resp, err); err != nil {
|
||||
return err
|
||||
}
|
||||
presp, err := s.rootCoordClient.ShowPartitions(ctx, &milvuspb.ShowPartitionsRequest{
|
||||
presp, err := s.rootCoordClient.ShowPartitionsInternal(ctx, &milvuspb.ShowPartitionsRequest{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType_ShowPartitions),
|
||||
commonpbutil.WithMsgID(0),
|
||||
|
|
|
@ -198,7 +198,7 @@ type mockRootCoord struct {
|
|||
collID UniqueID
|
||||
}
|
||||
|
||||
func (r *mockRootCoord) DescribeCollection(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
func (r *mockRootCoord) DescribeCollectionInternal(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
if req.CollectionID != r.collID {
|
||||
return &milvuspb.DescribeCollectionResponse{
|
||||
Status: &commonpb.Status{
|
||||
|
|
|
@ -156,6 +156,7 @@ func (s *Server) AssignSegmentID(ctx context.Context, req *datapb.AssignSegmentI
|
|||
zap.Int64("import task ID", r.GetImportTaskID()))
|
||||
|
||||
// Load the collection info from Root Coordinator, if it is not found in server meta.
|
||||
// Note: this request wouldn't be received if collection didn't exist.
|
||||
_, err := s.handler.GetCollection(ctx, r.GetCollectionID())
|
||||
if err != nil {
|
||||
log.Warn("cannot get collection schema", zap.Error(err))
|
||||
|
@ -609,7 +610,7 @@ func (s *Server) GetRecoveryInfo(ctx context.Context, req *datapb.GetRecoveryInf
|
|||
return resp, nil
|
||||
}
|
||||
|
||||
dresp, err := s.rootCoordClient.DescribeCollection(s.ctx, &milvuspb.DescribeCollectionRequest{
|
||||
dresp, err := s.rootCoordClient.DescribeCollectionInternal(s.ctx, &milvuspb.DescribeCollectionRequest{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType_DescribeCollection),
|
||||
commonpbutil.WithSourceID(Params.DataCoordCfg.GetNodeID()),
|
||||
|
|
|
@ -70,7 +70,7 @@ func (mService *metaService) getCollectionInfo(ctx context.Context, collID Uniqu
|
|||
TimeStamp: timestamp,
|
||||
}
|
||||
|
||||
response, err := mService.rootCoord.DescribeCollection(ctx, req)
|
||||
response, err := mService.rootCoord.DescribeCollectionInternal(ctx, req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("grpc error when describe collection %v from rootcoord: %s", collID, err.Error())
|
||||
}
|
||||
|
|
|
@ -65,8 +65,8 @@ type RootCoordFails1 struct {
|
|||
RootCoordFactory
|
||||
}
|
||||
|
||||
// DescribeCollection override method that will fails
|
||||
func (rc *RootCoordFails1) DescribeCollection(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
// DescribeCollectionInternal override method that will fails
|
||||
func (rc *RootCoordFails1) DescribeCollectionInternal(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
return nil, errors.New("always fail")
|
||||
}
|
||||
|
||||
|
@ -75,8 +75,8 @@ type RootCoordFails2 struct {
|
|||
RootCoordFactory
|
||||
}
|
||||
|
||||
// DescribeCollection override method that will fails
|
||||
func (rc *RootCoordFails2) DescribeCollection(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
// DescribeCollectionInternal override method that will fails
|
||||
func (rc *RootCoordFails2) DescribeCollectionInternal(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
return &milvuspb.DescribeCollectionResponse{
|
||||
Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_UnexpectedError},
|
||||
}, nil
|
||||
|
|
|
@ -1062,7 +1062,7 @@ func (m *RootCoordFactory) ShowCollections(ctx context.Context, in *milvuspb.Sho
|
|||
|
||||
}
|
||||
|
||||
func (m *RootCoordFactory) DescribeCollection(ctx context.Context, in *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
func (m *RootCoordFactory) DescribeCollectionInternal(ctx context.Context, in *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
f := MetaFactory{}
|
||||
meta := f.GetCollectionMeta(m.collectionID, m.collectionName, m.pkType)
|
||||
resp := &milvuspb.DescribeCollectionResponse{
|
||||
|
|
|
@ -136,6 +136,10 @@ func (m *MockRootCoord) DescribeCollection(ctx context.Context, req *milvuspb.De
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
func (m *MockRootCoord) DescribeCollectionInternal(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (m *MockRootCoord) ShowCollections(ctx context.Context, req *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
@ -160,6 +164,10 @@ func (m *MockRootCoord) ShowPartitions(ctx context.Context, req *milvuspb.ShowPa
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
func (m *MockRootCoord) ShowPartitionsInternal(ctx context.Context, req *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (m *MockRootCoord) CreateAlias(ctx context.Context, req *milvuspb.CreateAliasRequest) (*commonpb.Status, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
|
|
@ -240,6 +240,25 @@ func (c *Client) DescribeCollection(ctx context.Context, in *milvuspb.DescribeCo
|
|||
return ret.(*milvuspb.DescribeCollectionResponse), err
|
||||
}
|
||||
|
||||
// DescribeCollectionInternal return collection info
|
||||
func (c *Client) DescribeCollectionInternal(ctx context.Context, in *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
in = typeutil.Clone(in)
|
||||
commonpbutil.UpdateMsgBase(
|
||||
in.GetBase(),
|
||||
commonpbutil.FillMsgBaseFromClient(Params.RootCoordCfg.GetNodeID(), commonpbutil.WithTargetID(c.sess.ServerID)),
|
||||
)
|
||||
ret, err := c.grpcClient.ReCall(ctx, func(client rootcoordpb.RootCoordClient) (any, error) {
|
||||
if !funcutil.CheckCtxValid(ctx) {
|
||||
return nil, ctx.Err()
|
||||
}
|
||||
return client.DescribeCollectionInternal(ctx, in)
|
||||
})
|
||||
if err != nil || ret == nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret.(*milvuspb.DescribeCollectionResponse), err
|
||||
}
|
||||
|
||||
// ShowCollections list all collection names
|
||||
func (c *Client) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
|
||||
in = typeutil.Clone(in)
|
||||
|
@ -353,6 +372,25 @@ func (c *Client) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitions
|
|||
return ret.(*milvuspb.ShowPartitionsResponse), err
|
||||
}
|
||||
|
||||
// ShowPartitionsInternal list all partitions in collection
|
||||
func (c *Client) ShowPartitionsInternal(ctx context.Context, in *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
in = typeutil.Clone(in)
|
||||
commonpbutil.UpdateMsgBase(
|
||||
in.GetBase(),
|
||||
commonpbutil.FillMsgBaseFromClient(Params.RootCoordCfg.GetNodeID(), commonpbutil.WithTargetID(c.sess.ServerID)),
|
||||
)
|
||||
ret, err := c.grpcClient.ReCall(ctx, func(client rootcoordpb.RootCoordClient) (any, error) {
|
||||
if !funcutil.CheckCtxValid(ctx) {
|
||||
return nil, ctx.Err()
|
||||
}
|
||||
return client.ShowPartitionsInternal(ctx, in)
|
||||
})
|
||||
if err != nil || ret == nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret.(*milvuspb.ShowPartitionsResponse), err
|
||||
}
|
||||
|
||||
// AllocTimestamp global timestamp allocator
|
||||
func (c *Client) AllocTimestamp(ctx context.Context, in *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error) {
|
||||
in = typeutil.Clone(in)
|
||||
|
|
|
@ -354,6 +354,11 @@ func (s *Server) DescribeCollection(ctx context.Context, in *milvuspb.DescribeCo
|
|||
return s.rootCoord.DescribeCollection(ctx, in)
|
||||
}
|
||||
|
||||
// DescribeCollectionInternal gets meta info of a collection
|
||||
func (s *Server) DescribeCollectionInternal(ctx context.Context, in *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
return s.rootCoord.DescribeCollectionInternal(ctx, in)
|
||||
}
|
||||
|
||||
// ShowCollections gets all collections
|
||||
func (s *Server) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
|
||||
return s.rootCoord.ShowCollections(ctx, in)
|
||||
|
@ -379,6 +384,11 @@ func (s *Server) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitions
|
|||
return s.rootCoord.ShowPartitions(ctx, in)
|
||||
}
|
||||
|
||||
// ShowPartitionsInternal gets all partitions for the specified collection.
|
||||
func (s *Server) ShowPartitionsInternal(ctx context.Context, in *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
return s.rootCoord.ShowPartitionsInternal(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)
|
||||
|
|
|
@ -595,6 +595,53 @@ func (_c *RootCoord_DescribeCollection_Call) Return(_a0 *milvuspb.DescribeCollec
|
|||
return _c
|
||||
}
|
||||
|
||||
// DescribeCollectionInternal provides a mock function with given fields: ctx, req
|
||||
func (_m *RootCoord) DescribeCollectionInternal(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
ret := _m.Called(ctx, req)
|
||||
|
||||
var r0 *milvuspb.DescribeCollectionResponse
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeCollectionRequest) *milvuspb.DescribeCollectionResponse); ok {
|
||||
r0 = rf(ctx, req)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*milvuspb.DescribeCollectionResponse)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DescribeCollectionRequest) error); ok {
|
||||
r1 = rf(ctx, req)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// RootCoord_DescribeCollectionInternal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeCollectionInternal'
|
||||
type RootCoord_DescribeCollectionInternal_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// DescribeCollectionInternal is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.DescribeCollectionRequest
|
||||
func (_e *RootCoord_Expecter) DescribeCollectionInternal(ctx interface{}, req interface{}) *RootCoord_DescribeCollectionInternal_Call {
|
||||
return &RootCoord_DescribeCollectionInternal_Call{Call: _e.mock.On("DescribeCollectionInternal", ctx, req)}
|
||||
}
|
||||
|
||||
func (_c *RootCoord_DescribeCollectionInternal_Call) Run(run func(ctx context.Context, req *milvuspb.DescribeCollectionRequest)) *RootCoord_DescribeCollectionInternal_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*milvuspb.DescribeCollectionRequest))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *RootCoord_DescribeCollectionInternal_Call) Return(_a0 *milvuspb.DescribeCollectionResponse, _a1 error) *RootCoord_DescribeCollectionInternal_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
// DropAlias provides a mock function with given fields: ctx, req
|
||||
func (_m *RootCoord) DropAlias(ctx context.Context, req *milvuspb.DropAliasRequest) (*commonpb.Status, error) {
|
||||
ret := _m.Called(ctx, req)
|
||||
|
@ -1886,6 +1933,53 @@ func (_c *RootCoord_ShowPartitions_Call) Return(_a0 *milvuspb.ShowPartitionsResp
|
|||
return _c
|
||||
}
|
||||
|
||||
// ShowPartitionsInternal provides a mock function with given fields: ctx, req
|
||||
func (_m *RootCoord) ShowPartitionsInternal(ctx context.Context, req *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
ret := _m.Called(ctx, req)
|
||||
|
||||
var r0 *milvuspb.ShowPartitionsResponse
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowPartitionsRequest) *milvuspb.ShowPartitionsResponse); ok {
|
||||
r0 = rf(ctx, req)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*milvuspb.ShowPartitionsResponse)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ShowPartitionsRequest) error); ok {
|
||||
r1 = rf(ctx, req)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// RootCoord_ShowPartitionsInternal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowPartitionsInternal'
|
||||
type RootCoord_ShowPartitionsInternal_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// ShowPartitionsInternal is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.ShowPartitionsRequest
|
||||
func (_e *RootCoord_Expecter) ShowPartitionsInternal(ctx interface{}, req interface{}) *RootCoord_ShowPartitionsInternal_Call {
|
||||
return &RootCoord_ShowPartitionsInternal_Call{Call: _e.mock.On("ShowPartitionsInternal", ctx, req)}
|
||||
}
|
||||
|
||||
func (_c *RootCoord_ShowPartitionsInternal_Call) Run(run func(ctx context.Context, req *milvuspb.ShowPartitionsRequest)) *RootCoord_ShowPartitionsInternal_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*milvuspb.ShowPartitionsRequest))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *RootCoord_ShowPartitionsInternal_Call) Return(_a0 *milvuspb.ShowPartitionsResponse, _a1 error) *RootCoord_ShowPartitionsInternal_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
// ShowSegments provides a mock function with given fields: ctx, req
|
||||
func (_m *RootCoord) ShowSegments(ctx context.Context, req *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) {
|
||||
ret := _m.Called(ctx, req)
|
||||
|
|
|
@ -49,6 +49,7 @@ service RootCoord {
|
|||
* @return CollectionSchema
|
||||
*/
|
||||
rpc DescribeCollection(milvus.DescribeCollectionRequest) returns (milvus.DescribeCollectionResponse) {}
|
||||
rpc DescribeCollectionInternal(milvus.DescribeCollectionRequest) returns (milvus.DescribeCollectionResponse) {}
|
||||
|
||||
rpc CreateAlias(milvus.CreateAliasRequest) returns (common.Status) {}
|
||||
rpc DropAlias(milvus.DropAliasRequest) returns (common.Status) {}
|
||||
|
@ -92,6 +93,7 @@ service RootCoord {
|
|||
* @return StringListResponse
|
||||
*/
|
||||
rpc ShowPartitions(milvus.ShowPartitionsRequest) returns (milvus.ShowPartitionsResponse) {}
|
||||
rpc ShowPartitionsInternal(milvus.ShowPartitionsRequest) returns (milvus.ShowPartitionsResponse) {}
|
||||
|
||||
// rpc DescribeSegment(milvus.DescribeSegmentRequest) returns (milvus.DescribeSegmentResponse) {}
|
||||
rpc ShowSegments(milvus.ShowSegmentsRequest) returns (milvus.ShowSegmentsResponse) {}
|
||||
|
|
|
@ -674,103 +674,105 @@ func init() {
|
|||
func init() { proto.RegisterFile("root_coord.proto", fileDescriptor_4513485a144f6b06) }
|
||||
|
||||
var fileDescriptor_4513485a144f6b06 = []byte{
|
||||
// 1535 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x6b, 0x93, 0xda, 0x36,
|
||||
0x17, 0x0e, 0x90, 0xbd, 0x70, 0x60, 0x61, 0xa3, 0xc9, 0x85, 0x97, 0xe4, 0x7d, 0x43, 0x48, 0xde,
|
||||
0x86, 0xdc, 0xd8, 0x74, 0x33, 0x93, 0xa6, 0xf9, 0x96, 0x85, 0xcc, 0x86, 0x69, 0x77, 0xb2, 0x35,
|
||||
0x49, 0x27, 0xbd, 0xec, 0x50, 0x61, 0x2b, 0xe0, 0x59, 0x63, 0x11, 0x49, 0xec, 0x65, 0xfa, 0xa9,
|
||||
0x33, 0xfd, 0xde, 0xff, 0xd4, 0xfe, 0x94, 0xfe, 0x90, 0x76, 0x64, 0xd9, 0xc2, 0x36, 0x36, 0xeb,
|
||||
0x4d, 0xf2, 0x0d, 0x49, 0x8f, 0x9f, 0xe7, 0xe8, 0x1c, 0x9d, 0x73, 0x24, 0x60, 0x93, 0x51, 0x2a,
|
||||
0x06, 0x26, 0xa5, 0xcc, 0x6a, 0x4f, 0x19, 0x15, 0x14, 0x5d, 0x9d, 0xd8, 0xce, 0xd1, 0x8c, 0xab,
|
||||
0x51, 0x5b, 0x2e, 0x7b, 0xab, 0xf5, 0xb2, 0x49, 0x27, 0x13, 0xea, 0xaa, 0xf9, 0x7a, 0x39, 0x8c,
|
||||
0xaa, 0x57, 0x6c, 0x57, 0x10, 0xe6, 0x62, 0xc7, 0x1f, 0x97, 0xa6, 0x8c, 0x9e, 0x9c, 0xfa, 0x83,
|
||||
0x2a, 0x11, 0xa6, 0x35, 0x98, 0x10, 0x81, 0xd5, 0x44, 0x73, 0x00, 0x57, 0x5e, 0x38, 0x0e, 0x35,
|
||||
0xdf, 0xd8, 0x13, 0xc2, 0x05, 0x9e, 0x4c, 0x0d, 0xf2, 0x61, 0x46, 0xb8, 0x40, 0x8f, 0xe1, 0xe2,
|
||||
0x10, 0x73, 0x52, 0xcb, 0x35, 0x72, 0xad, 0xd2, 0xf6, 0x8d, 0x76, 0xc4, 0x12, 0x5f, 0x7e, 0x8f,
|
||||
0x8f, 0x76, 0x30, 0x27, 0x86, 0x87, 0x44, 0x97, 0x61, 0xc5, 0xa4, 0x33, 0x57, 0xd4, 0x0a, 0x8d,
|
||||
0x5c, 0x6b, 0xc3, 0x50, 0x83, 0xe6, 0x6f, 0x39, 0xb8, 0x1a, 0x57, 0xe0, 0x53, 0xea, 0x72, 0x82,
|
||||
0x9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d1, 0x10, 0x79, 0xe3, 0xcf, 0xc0, 0xec, 0x67, 0xe5, 0xe7,
|
||||
0x66, 0x1e, 0xc0, 0x66, 0x97, 0x38, 0x24, 0xc2, 0xfc, 0x30, 0xe5, 0x0a, 0x13, 0x85, 0x65, 0xcc,
|
||||
0xbc, 0x31, 0x6c, 0xc8, 0x30, 0xc8, 0xef, 0xde, 0x72, 0xc2, 0x78, 0x4a, 0xbf, 0x8a, 0x60, 0x02,
|
||||
0xea, 0xfb, 0x59, 0xa0, 0xa1, 0x33, 0xb4, 0x11, 0x79, 0xc2, 0xc4, 0xf7, 0x31, 0x0f, 0x6a, 0xd2,
|
||||
0x83, 0xaa, 0xfe, 0x28, 0x23, 0x3a, 0x74, 0x86, 0x40, 0x85, 0xdb, 0xa0, 0x0e, 0x49, 0x49, 0xeb,
|
||||
0x39, 0x20, 0xa3, 0xbb, 0x5e, 0xc3, 0xba, 0x6c, 0xdd, 0x1e, 0xe5, 0x9d, 0xd4, 0xce, 0x7e, 0x0e,
|
||||
0xc2, 0x03, 0xa8, 0xbe, 0x9e, 0x12, 0x86, 0x05, 0x91, 0xfe, 0xf2, 0x78, 0x93, 0x33, 0x2b, 0x86,
|
||||
0xca, 0x7c, 0x2b, 0x87, 0x3e, 0x91, 0x15, 0x7c, 0x89, 0x13, 0xe6, 0x80, 0xe5, 0xb5, 0x2d, 0x8c,
|
||||
0x0b, 0x17, 0x4f, 0x35, 0x2f, 0x0d, 0x5b, 0x2a, 0xe0, 0x59, 0x9e, 0x41, 0x40, 0xe1, 0xc2, 0xaf,
|
||||
0x22, 0x7f, 0xeb, 0xfb, 0xcc, 0x3e, 0xb2, 0x1d, 0x32, 0x22, 0x29, 0x19, 0x10, 0x87, 0x65, 0x74,
|
||||
0xd1, 0x10, 0x4a, 0x4a, 0x78, 0x97, 0x61, 0x57, 0xa0, 0x65, 0xa6, 0x79, 0x88, 0x80, 0xb6, 0x75,
|
||||
0x36, 0x50, 0x6f, 0xc2, 0x04, 0x90, 0x69, 0xb1, 0x4f, 0x1d, 0xdb, 0x3c, 0x8d, 0x5f, 0x76, 0x74,
|
||||
0x69, 0x98, 0x43, 0x52, 0x2e, 0x3b, 0x89, 0x48, 0x2d, 0x32, 0x84, 0x52, 0x67, 0x4c, 0xcc, 0xc3,
|
||||
0x57, 0x04, 0x3b, 0x62, 0x9c, 0xf6, 0x4e, 0x99, 0x23, 0x96, 0x6f, 0x24, 0x02, 0x0c, 0x34, 0x76,
|
||||
0x9e, 0xfd, 0xf8, 0x74, 0x64, 0x8b, 0xf1, 0x6c, 0x28, 0xdd, 0xb8, 0xa5, 0xa0, 0x8f, 0x6c, 0xea,
|
||||
0xff, 0xda, 0x0a, 0x0c, 0xdc, 0xf2, 0xa8, 0xb6, 0x74, 0x92, 0x4e, 0x87, 0xc3, 0x55, 0x6f, 0xea,
|
||||
0xc9, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x94, 0x82, 0xd4, 0x6e, 0x4c, 0x18, 0x00, 0x00,
|
||||
// 1557 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5b, 0x93, 0xda, 0x36,
|
||||
0x14, 0x0e, 0x90, 0xbd, 0x1d, 0x58, 0xd8, 0x68, 0x72, 0xa1, 0x24, 0x6d, 0x09, 0x49, 0x1b, 0x72,
|
||||
0x63, 0xd3, 0xcd, 0x4c, 0x9a, 0xe6, 0x2d, 0x0b, 0x99, 0x0d, 0xd3, 0xee, 0x64, 0x6b, 0x92, 0x4e,
|
||||
0x7a, 0xd9, 0xa1, 0xc2, 0x56, 0xc0, 0xb3, 0xc6, 0x22, 0x92, 0xd8, 0xcb, 0xf4, 0xa1, 0xd3, 0x99,
|
||||
0xbe, 0xf7, 0x3f, 0xb5, 0x3f, 0xa5, 0xbf, 0xa1, 0xef, 0x1d, 0x59, 0xb6, 0xb0, 0x8d, 0xcd, 0x7a,
|
||||
0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x20, 0x4c, 0x71, 0x7e, 0x9e, 0xc8, 0x39, 0x03, 0x64, 0x24, 0x75, 0xa1,
|
||||
0xd2, 0x1b, 0xc9, 0xee, 0x2a, 0x70, 0x0d, 0x47, 0x77, 0x93, 0x2b, 0x2a, 0x8a, 0x0a, 0xe8, 0xef,
|
||||
0x65, 0x03, 0x6b, 0x77, 0xef, 0xcb, 0xd6, 0x59, 0x10, 0x16, 0xca, 0xb2, 0xbb, 0xe9, 0x3b, 0x39,
|
||||
0x73, 0xa1, 0xec, 0x43, 0x45, 0xc5, 0x6a, 0x2f, 0x68, 0x88, 0x52, 0xe8, 0x63, 0xa8, 0x8c, 0xf4,
|
||||
0xdf, 0xc3, 0xba, 0x8c, 0xda, 0x8c, 0xfc, 0x76, 0x6a, 0x64, 0xcf, 0x4a, 0xbd, 0x0f, 0xa5, 0xe7,
|
||||
0x98, 0xcf, 0x98, 0x9b, 0x69, 0x15, 0x3e, 0x47, 0x9c, 0xa9, 0xc0, 0x0f, 0xa0, 0x2c, 0x83, 0xa2,
|
||||
0x3f, 0xe6, 0x29, 0xc7, 0x53, 0x14, 0x14, 0x48, 0xdc, 0xcd, 0x84, 0xd5, 0x62, 0x1c, 0x2e, 0x47,
|
||||
0xd7, 0x74, 0x41, 0xff, 0x87, 0xa2, 0x04, 0x4a, 0x72, 0x2d, 0xe8, 0x65, 0x52, 0x1c, 0x18, 0x86,
|
||||
0x04, 0x42, 0xb7, 0x33, 0x20, 0x43, 0x77, 0x57, 0x39, 0xfa, 0xb0, 0x45, 0xf7, 0xd3, 0xda, 0x9a,
|
||||
0xc4, 0x27, 0x76, 0xad, 0x95, 0x15, 0xae, 0x25, 0x7f, 0x82, 0x15, 0xff, 0xb9, 0x19, 0xaf, 0xfa,
|
||||
0xd8, 0xc7, 0xfa, 0xa5, 0x5b, 0xbb, 0x75, 0x2a, 0x4e, 0xb3, 0x63, 0xb8, 0xf4, 0x6a, 0x62, 0xc9,
|
||||
0x2b, 0x4f, 0x5d, 0x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xc9, 0xc0, 0xec, 0x57, 0xe5, 0x87, 0x66, 0xee, 0xc3, 0x46, 0x87, 0x38, 0x24, 0xc2, 0x7c, 0x2f,
|
||||
0xa5, 0x6f, 0x8a, 0xc2, 0x32, 0x56, 0xde, 0x08, 0xd6, 0x65, 0x18, 0xe4, 0x77, 0xaf, 0x38, 0x61,
|
||||
0x3c, 0xe5, 0x92, 0x8c, 0x60, 0x02, 0xea, 0x3b, 0x59, 0xa0, 0xa1, 0x1c, 0x5a, 0x8f, 0x3c, 0xdc,
|
||||
0xe2, 0xfb, 0x98, 0x05, 0x35, 0xe9, 0x19, 0x59, 0xbb, 0x9f, 0x11, 0x1d, 0xca, 0x21, 0x50, 0xe1,
|
||||
0x36, 0xa8, 0x43, 0x52, 0xca, 0x7a, 0x06, 0xc8, 0xe8, 0xae, 0x17, 0xb0, 0x2a, 0xfb, 0x05, 0x8f,
|
||||
0xf2, 0x66, 0x6a, 0x3b, 0x71, 0x06, 0xc2, 0x7d, 0xa8, 0xbc, 0x98, 0x10, 0x86, 0x05, 0x91, 0xfe,
|
||||
0xf2, 0x78, 0x93, 0x2b, 0x2b, 0x86, 0xca, 0xfc, 0x16, 0x81, 0x1e, 0x91, 0x27, 0xf8, 0x02, 0x27,
|
||||
0xcc, 0x00, 0x8b, 0xcf, 0xb6, 0x30, 0x2e, 0x7c, 0x78, 0xaa, 0x79, 0x69, 0xd8, 0x42, 0x01, 0xcf,
|
||||
0xf2, 0x0c, 0x02, 0x0a, 0x17, 0x7e, 0x0b, 0xfa, 0x5b, 0xdf, 0x63, 0xf6, 0xa1, 0xed, 0x90, 0x21,
|
||||
0x49, 0xa9, 0x80, 0x38, 0x2c, 0xa3, 0x8b, 0x06, 0x50, 0x54, 0xc2, 0x3b, 0x0c, 0xbb, 0x02, 0x2d,
|
||||
0x32, 0xcd, 0x43, 0x04, 0xb4, 0xcd, 0xd3, 0x81, 0x7a, 0x13, 0x26, 0x80, 0x2c, 0x8b, 0x3d, 0xea,
|
||||
0xd8, 0xe6, 0x49, 0xbc, 0xd9, 0xd1, 0x47, 0xc3, 0x0c, 0x92, 0xd2, 0xec, 0x24, 0x22, 0xb5, 0xc8,
|
||||
0x00, 0x8a, 0xed, 0x11, 0x31, 0x0f, 0x9e, 0x13, 0xec, 0x88, 0x51, 0xda, 0xe3, 0x68, 0x86, 0x58,
|
||||
0xbc, 0x91, 0x08, 0x30, 0xd0, 0xd8, 0x7e, 0xfc, 0xc3, 0xa3, 0xa1, 0x2d, 0x46, 0xd3, 0x81, 0x74,
|
||||
0xe3, 0xa6, 0x82, 0xde, 0xb7, 0xa9, 0xff, 0x6b, 0x33, 0x30, 0x70, 0xd3, 0xa3, 0xda, 0xd4, 0x45,
|
||||
0x3a, 0x19, 0x0c, 0x96, 0xbd, 0xa9, 0x87, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x68, 0x68, 0x82,
|
||||
0xf8, 0x42, 0x19, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -816,6 +818,7 @@ type RootCoordClient interface {
|
|||
//
|
||||
// @return CollectionSchema
|
||||
DescribeCollection(ctx context.Context, in *milvuspb.DescribeCollectionRequest, opts ...grpc.CallOption) (*milvuspb.DescribeCollectionResponse, error)
|
||||
DescribeCollectionInternal(ctx context.Context, in *milvuspb.DescribeCollectionRequest, opts ...grpc.CallOption) (*milvuspb.DescribeCollectionResponse, error)
|
||||
CreateAlias(ctx context.Context, in *milvuspb.CreateAliasRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
|
||||
DropAlias(ctx context.Context, in *milvuspb.DropAliasRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
|
||||
AlterAlias(ctx context.Context, in *milvuspb.AlterAliasRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
|
||||
|
@ -847,6 +850,7 @@ type RootCoordClient interface {
|
|||
//
|
||||
// @return StringListResponse
|
||||
ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionsResponse, error)
|
||||
ShowPartitionsInternal(ctx context.Context, in *milvuspb.ShowPartitionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionsResponse, error)
|
||||
// rpc DescribeSegment(milvus.DescribeSegmentRequest) returns (milvus.DescribeSegmentResponse) {}
|
||||
ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentsRequest, opts ...grpc.CallOption) (*milvuspb.ShowSegmentsResponse, error)
|
||||
AllocTimestamp(ctx context.Context, in *AllocTimestampRequest, opts ...grpc.CallOption) (*AllocTimestampResponse, error)
|
||||
|
@ -951,6 +955,15 @@ func (c *rootCoordClient) DescribeCollection(ctx context.Context, in *milvuspb.D
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *rootCoordClient) DescribeCollectionInternal(ctx context.Context, in *milvuspb.DescribeCollectionRequest, opts ...grpc.CallOption) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
out := new(milvuspb.DescribeCollectionResponse)
|
||||
err := c.cc.Invoke(ctx, "/milvus.proto.rootcoord.RootCoord/DescribeCollectionInternal", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *rootCoordClient) CreateAlias(ctx context.Context, in *milvuspb.CreateAliasRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
||||
out := new(commonpb.Status)
|
||||
err := c.cc.Invoke(ctx, "/milvus.proto.rootcoord.RootCoord/CreateAlias", in, out, opts...)
|
||||
|
@ -1032,6 +1045,15 @@ func (c *rootCoordClient) ShowPartitions(ctx context.Context, in *milvuspb.ShowP
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *rootCoordClient) ShowPartitionsInternal(ctx context.Context, in *milvuspb.ShowPartitionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
out := new(milvuspb.ShowPartitionsResponse)
|
||||
err := c.cc.Invoke(ctx, "/milvus.proto.rootcoord.RootCoord/ShowPartitionsInternal", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *rootCoordClient) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentsRequest, opts ...grpc.CallOption) (*milvuspb.ShowSegmentsResponse, error) {
|
||||
out := new(milvuspb.ShowSegmentsResponse)
|
||||
err := c.cc.Invoke(ctx, "/milvus.proto.rootcoord.RootCoord/ShowSegments", in, out, opts...)
|
||||
|
@ -1290,6 +1312,7 @@ type RootCoordServer interface {
|
|||
//
|
||||
// @return CollectionSchema
|
||||
DescribeCollection(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)
|
||||
DescribeCollectionInternal(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)
|
||||
CreateAlias(context.Context, *milvuspb.CreateAliasRequest) (*commonpb.Status, error)
|
||||
DropAlias(context.Context, *milvuspb.DropAliasRequest) (*commonpb.Status, error)
|
||||
AlterAlias(context.Context, *milvuspb.AlterAliasRequest) (*commonpb.Status, error)
|
||||
|
@ -1321,6 +1344,7 @@ type RootCoordServer interface {
|
|||
//
|
||||
// @return StringListResponse
|
||||
ShowPartitions(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)
|
||||
ShowPartitionsInternal(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)
|
||||
// rpc DescribeSegment(milvus.DescribeSegmentRequest) returns (milvus.DescribeSegmentResponse) {}
|
||||
ShowSegments(context.Context, *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error)
|
||||
AllocTimestamp(context.Context, *AllocTimestampRequest) (*AllocTimestampResponse, error)
|
||||
|
@ -1379,6 +1403,9 @@ func (*UnimplementedRootCoordServer) HasCollection(ctx context.Context, req *mil
|
|||
func (*UnimplementedRootCoordServer) DescribeCollection(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DescribeCollection not implemented")
|
||||
}
|
||||
func (*UnimplementedRootCoordServer) DescribeCollectionInternal(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DescribeCollectionInternal not implemented")
|
||||
}
|
||||
func (*UnimplementedRootCoordServer) CreateAlias(ctx context.Context, req *milvuspb.CreateAliasRequest) (*commonpb.Status, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateAlias not implemented")
|
||||
}
|
||||
|
@ -1406,6 +1433,9 @@ func (*UnimplementedRootCoordServer) HasPartition(ctx context.Context, req *milv
|
|||
func (*UnimplementedRootCoordServer) ShowPartitions(ctx context.Context, req *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ShowPartitions not implemented")
|
||||
}
|
||||
func (*UnimplementedRootCoordServer) ShowPartitionsInternal(ctx context.Context, req *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ShowPartitionsInternal not implemented")
|
||||
}
|
||||
func (*UnimplementedRootCoordServer) ShowSegments(ctx context.Context, req *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ShowSegments not implemented")
|
||||
}
|
||||
|
@ -1612,6 +1642,24 @@ func _RootCoord_DescribeCollection_Handler(srv interface{}, ctx context.Context,
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RootCoord_DescribeCollectionInternal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(milvuspb.DescribeCollectionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RootCoordServer).DescribeCollectionInternal(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/milvus.proto.rootcoord.RootCoord/DescribeCollectionInternal",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RootCoordServer).DescribeCollectionInternal(ctx, req.(*milvuspb.DescribeCollectionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RootCoord_CreateAlias_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(milvuspb.CreateAliasRequest)
|
||||
if err := dec(in); err != nil {
|
||||
|
@ -1774,6 +1822,24 @@ func _RootCoord_ShowPartitions_Handler(srv interface{}, ctx context.Context, dec
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RootCoord_ShowPartitionsInternal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(milvuspb.ShowPartitionsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RootCoordServer).ShowPartitionsInternal(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/milvus.proto.rootcoord.RootCoord/ShowPartitionsInternal",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RootCoordServer).ShowPartitionsInternal(ctx, req.(*milvuspb.ShowPartitionsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RootCoord_ShowSegments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(milvuspb.ShowSegmentsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
|
@ -2256,6 +2322,10 @@ var _RootCoord_serviceDesc = grpc.ServiceDesc{
|
|||
MethodName: "DescribeCollection",
|
||||
Handler: _RootCoord_DescribeCollection_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DescribeCollectionInternal",
|
||||
Handler: _RootCoord_DescribeCollectionInternal_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateAlias",
|
||||
Handler: _RootCoord_CreateAlias_Handler,
|
||||
|
@ -2292,6 +2362,10 @@ var _RootCoord_serviceDesc = grpc.ServiceDesc{
|
|||
MethodName: "ShowPartitions",
|
||||
Handler: _RootCoord_ShowPartitions_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ShowPartitionsInternal",
|
||||
Handler: _RootCoord_ShowPartitionsInternal_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ShowSegments",
|
||||
Handler: _RootCoord_ShowSegments_Handler,
|
||||
|
|
|
@ -495,6 +495,10 @@ func (coord *RootCoordMock) DescribeCollection(ctx context.Context, req *milvusp
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (coord *RootCoordMock) DescribeCollectionInternal(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
return coord.DescribeCollection(ctx, req)
|
||||
}
|
||||
|
||||
func (coord *RootCoordMock) ShowCollections(ctx context.Context, req *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
|
||||
code := coord.state.Load().(commonpb.StateCode)
|
||||
if code != commonpb.StateCode_Healthy {
|
||||
|
@ -720,6 +724,10 @@ func (coord *RootCoordMock) ShowPartitions(ctx context.Context, req *milvuspb.Sh
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (coord *RootCoordMock) ShowPartitionsInternal(ctx context.Context, req *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
return coord.ShowPartitions(ctx, req)
|
||||
}
|
||||
|
||||
//func (coord *RootCoordMock) CreateIndex(ctx context.Context, req *milvuspb.CreateIndexRequest) (*commonpb.Status, error) {
|
||||
// code := coord.state.Load().(commonpb.StateCode)
|
||||
// if code != commonpb.StateCode_Healthy {
|
||||
|
@ -1167,6 +1175,10 @@ func (m *mockRootCoord) DescribeCollection(ctx context.Context, request *milvusp
|
|||
return nil, errors.New("mock")
|
||||
}
|
||||
|
||||
func (m *mockRootCoord) DescribeCollectionInternal(ctx context.Context, request *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
return m.DescribeCollection(ctx, request)
|
||||
}
|
||||
|
||||
func (m *mockRootCoord) ShowPartitions(ctx context.Context, request *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
if m.ShowPartitionsFunc != nil {
|
||||
return m.ShowPartitionsFunc(ctx, request)
|
||||
|
@ -1174,6 +1186,10 @@ func (m *mockRootCoord) ShowPartitions(ctx context.Context, request *milvuspb.Sh
|
|||
return nil, errors.New("mock")
|
||||
}
|
||||
|
||||
func (m *mockRootCoord) ShowPartitionsInternal(ctx context.Context, request *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
return m.ShowPartitions(ctx, request)
|
||||
}
|
||||
|
||||
func (m *mockRootCoord) ShowSegments(ctx context.Context, request *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) {
|
||||
if m.ShowSegmentsFunc != nil {
|
||||
return m.ShowSegmentsFunc(ctx, request)
|
||||
|
|
|
@ -76,7 +76,7 @@ func (broker *CoordinatorBroker) GetCollectionSchema(ctx context.Context, collec
|
|||
),
|
||||
CollectionID: collectionID,
|
||||
}
|
||||
resp, err := broker.rootCoord.DescribeCollection(ctx, req)
|
||||
resp, err := broker.rootCoord.DescribeCollectionInternal(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ func (broker *CoordinatorBroker) GetPartitions(ctx context.Context, collectionID
|
|||
),
|
||||
CollectionID: collectionID,
|
||||
}
|
||||
resp, err := broker.rootCoord.ShowPartitions(ctx, req)
|
||||
resp, err := broker.rootCoord.ShowPartitionsInternal(ctx, req)
|
||||
if err != nil {
|
||||
log.Warn("showPartition failed", zap.Int64("collectionID", collectionID), zap.Error(err))
|
||||
return nil, err
|
||||
|
|
|
@ -34,12 +34,12 @@ import (
|
|||
)
|
||||
|
||||
func TestCoordinatorBroker_GetCollectionSchema(t *testing.T) {
|
||||
t.Run("got error on DescribeCollection", func(t *testing.T) {
|
||||
t.Run("got error on DescribeCollectionInternal", func(t *testing.T) {
|
||||
rootCoord := mocks.NewRootCoord(t)
|
||||
rootCoord.On("DescribeCollection",
|
||||
rootCoord.On("DescribeCollectionInternal",
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
).Return(nil, errors.New("error mock DescribeCollection"))
|
||||
).Return(nil, errors.New("error mock DescribeCollectionInternal"))
|
||||
ctx := context.Background()
|
||||
broker := &CoordinatorBroker{rootCoord: rootCoord}
|
||||
_, err := broker.GetCollectionSchema(ctx, 100)
|
||||
|
@ -48,7 +48,7 @@ func TestCoordinatorBroker_GetCollectionSchema(t *testing.T) {
|
|||
|
||||
t.Run("non-success code", func(t *testing.T) {
|
||||
rootCoord := mocks.NewRootCoord(t)
|
||||
rootCoord.On("DescribeCollection",
|
||||
rootCoord.On("DescribeCollectionInternal",
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
).Return(&milvuspb.DescribeCollectionResponse{
|
||||
|
@ -62,7 +62,7 @@ func TestCoordinatorBroker_GetCollectionSchema(t *testing.T) {
|
|||
|
||||
t.Run("normal case", func(t *testing.T) {
|
||||
rootCoord := mocks.NewRootCoord(t)
|
||||
rootCoord.On("DescribeCollection",
|
||||
rootCoord.On("DescribeCollectionInternal",
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
).Return(&milvuspb.DescribeCollectionResponse{
|
||||
|
|
|
@ -243,7 +243,7 @@ func (b *ServerBroker) GetSegmentIndexState(ctx context.Context, collID UniqueID
|
|||
func (b *ServerBroker) BroadcastAlteredCollection(ctx context.Context, req *milvuspb.AlterCollectionRequest) error {
|
||||
log.Info("broadcasting request to alter collection", zap.String("collection name", req.GetCollectionName()), zap.Int64("collection id", req.GetCollectionID()))
|
||||
|
||||
colMeta, err := b.s.meta.GetCollectionByID(ctx, req.GetCollectionID(), typeutil.MaxTimestamp)
|
||||
colMeta, err := b.s.meta.GetCollectionByID(ctx, req.GetCollectionID(), typeutil.MaxTimestamp, false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -303,7 +303,7 @@ func TestServerBroker_BroadcastAlteredCollection(t *testing.T) {
|
|||
t.Run("get meta fail", func(t *testing.T) {
|
||||
c := newTestCore(withInvalidDataCoord())
|
||||
c.meta = &mockMetaTable{
|
||||
GetCollectionByIDFunc: func(ctx context.Context, collectionID UniqueID, ts Timestamp) (*model.Collection, error) {
|
||||
GetCollectionByIDFunc: func(ctx context.Context, collectionID UniqueID, ts Timestamp, allowUnavailable bool) (*model.Collection, error) {
|
||||
return nil, errors.New("err")
|
||||
},
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ func TestServerBroker_BroadcastAlteredCollection(t *testing.T) {
|
|||
t.Run("failed to execute", func(t *testing.T) {
|
||||
c := newTestCore(withInvalidDataCoord())
|
||||
c.meta = &mockMetaTable{
|
||||
GetCollectionByIDFunc: func(ctx context.Context, collectionID UniqueID, ts Timestamp) (*model.Collection, error) {
|
||||
GetCollectionByIDFunc: func(ctx context.Context, collectionID UniqueID, ts Timestamp, allowUnavailable bool) (*model.Collection, error) {
|
||||
return collMeta, nil
|
||||
},
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ func TestServerBroker_BroadcastAlteredCollection(t *testing.T) {
|
|||
t.Run("non success error code on execute", func(t *testing.T) {
|
||||
c := newTestCore(withFailedDataCoord())
|
||||
c.meta = &mockMetaTable{
|
||||
GetCollectionByIDFunc: func(ctx context.Context, collectionID UniqueID, ts Timestamp) (*model.Collection, error) {
|
||||
GetCollectionByIDFunc: func(ctx context.Context, collectionID UniqueID, ts Timestamp, allowUnavailable bool) (*model.Collection, error) {
|
||||
return collMeta, nil
|
||||
},
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ func TestServerBroker_BroadcastAlteredCollection(t *testing.T) {
|
|||
t.Run("success", func(t *testing.T) {
|
||||
c := newTestCore(withValidDataCoord())
|
||||
c.meta = &mockMetaTable{
|
||||
GetCollectionByIDFunc: func(ctx context.Context, collectionID UniqueID, ts Timestamp) (*model.Collection, error) {
|
||||
GetCollectionByIDFunc: func(ctx context.Context, collectionID UniqueID, ts Timestamp, allowUnavailable bool) (*model.Collection, error) {
|
||||
return collMeta, nil
|
||||
},
|
||||
}
|
||||
|
|
|
@ -10,8 +10,9 @@ import (
|
|||
// describeCollectionTask describe collection request task
|
||||
type describeCollectionTask struct {
|
||||
baseTask
|
||||
Req *milvuspb.DescribeCollectionRequest
|
||||
Rsp *milvuspb.DescribeCollectionResponse
|
||||
Req *milvuspb.DescribeCollectionRequest
|
||||
Rsp *milvuspb.DescribeCollectionResponse
|
||||
allowUnavailable bool
|
||||
}
|
||||
|
||||
func (t *describeCollectionTask) Prepare(ctx context.Context) error {
|
||||
|
@ -23,7 +24,7 @@ func (t *describeCollectionTask) Prepare(ctx context.Context) error {
|
|||
|
||||
// Execute task execution
|
||||
func (t *describeCollectionTask) Execute(ctx context.Context) (err error) {
|
||||
coll, err := t.core.describeCollection(ctx, t.Req)
|
||||
coll, err := t.core.describeCollection(ctx, t.Req, t.allowUnavailable)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ func Test_describeCollectionTask_Execute(t *testing.T) {
|
|||
|
||||
t.Run("success", func(t *testing.T) {
|
||||
meta := newMockMetaTable()
|
||||
meta.GetCollectionByIDFunc = func(ctx context.Context, collectionID UniqueID, ts Timestamp) (*model.Collection, error) {
|
||||
meta.GetCollectionByIDFunc = func(ctx context.Context, collectionID UniqueID, ts Timestamp, allowUnavailable bool) (*model.Collection, error) {
|
||||
return &model.Collection{
|
||||
CollectionID: 1,
|
||||
Name: "test coll",
|
||||
|
|
|
@ -73,7 +73,7 @@ func NewImportFactory(c *Core) ImportFactory {
|
|||
|
||||
func GetCollectionNameWithCore(c *Core) GetCollectionNameFunc {
|
||||
return func(collID, partitionID UniqueID) (string, string, error) {
|
||||
colInfo, err := c.meta.GetCollectionByID(c.ctx, collID, typeutil.MaxTimestamp)
|
||||
colInfo, err := c.meta.GetCollectionByID(c.ctx, collID, typeutil.MaxTimestamp, false)
|
||||
if err != nil {
|
||||
log.Error("Core failed to get collection name by id", zap.Int64("ID", collID), zap.Error(err))
|
||||
return "", "", err
|
||||
|
|
|
@ -67,7 +67,7 @@ type IMetaTable interface {
|
|||
ChangeCollectionState(ctx context.Context, collectionID UniqueID, state pb.CollectionState, ts Timestamp) error
|
||||
RemoveCollection(ctx context.Context, collectionID UniqueID, ts Timestamp) error
|
||||
GetCollectionByName(ctx context.Context, collectionName string, ts Timestamp) (*model.Collection, error)
|
||||
GetCollectionByID(ctx context.Context, collectionID UniqueID, ts Timestamp) (*model.Collection, error)
|
||||
GetCollectionByID(ctx context.Context, collectionID UniqueID, ts Timestamp, allowUnavailable bool) (*model.Collection, error)
|
||||
ListCollections(ctx context.Context, ts Timestamp) ([]*model.Collection, error)
|
||||
ListAbnormalCollections(ctx context.Context, ts Timestamp) ([]*model.Collection, error)
|
||||
ListCollectionPhysicalChannels() map[typeutil.UniqueID][]string
|
||||
|
@ -297,18 +297,24 @@ func filterUnavailable(coll *model.Collection) *model.Collection {
|
|||
}
|
||||
|
||||
// getLatestCollectionByIDInternal should be called with ts = typeutil.MaxTimestamp
|
||||
func (mt *MetaTable) getLatestCollectionByIDInternal(ctx context.Context, collectionID UniqueID) (*model.Collection, error) {
|
||||
func (mt *MetaTable) getLatestCollectionByIDInternal(ctx context.Context, collectionID UniqueID, allowAvailable bool) (*model.Collection, error) {
|
||||
coll, ok := mt.collID2Meta[collectionID]
|
||||
if !ok || coll == nil || !coll.Available() {
|
||||
if !ok || coll == nil {
|
||||
return nil, common.NewCollectionNotExistError(fmt.Sprintf("can't find collection: %d", collectionID))
|
||||
}
|
||||
if allowAvailable {
|
||||
return coll.Clone(), nil
|
||||
}
|
||||
if !coll.Available() {
|
||||
return nil, common.NewCollectionNotExistError(fmt.Sprintf("can't find collection: %d", collectionID))
|
||||
}
|
||||
return filterUnavailable(coll), nil
|
||||
}
|
||||
|
||||
// getCollectionByIDInternal get collection by collection id without lock.
|
||||
func (mt *MetaTable) getCollectionByIDInternal(ctx context.Context, collectionID UniqueID, ts Timestamp) (*model.Collection, error) {
|
||||
func (mt *MetaTable) getCollectionByIDInternal(ctx context.Context, collectionID UniqueID, ts Timestamp, allowUnavailable bool) (*model.Collection, error) {
|
||||
if isMaxTs(ts) {
|
||||
return mt.getLatestCollectionByIDInternal(ctx, collectionID)
|
||||
return mt.getLatestCollectionByIDInternal(ctx, collectionID, allowUnavailable)
|
||||
}
|
||||
|
||||
var coll *model.Collection
|
||||
|
@ -324,7 +330,16 @@ func (mt *MetaTable) getCollectionByIDInternal(ctx context.Context, collectionID
|
|||
}
|
||||
}
|
||||
|
||||
if coll == nil || !coll.Available() {
|
||||
if coll == nil {
|
||||
// use coll.Name to match error message of regression. TODO: remove this after error code is ready.
|
||||
return nil, common.NewCollectionNotExistError(fmt.Sprintf("can't find collection: %s", coll.Name))
|
||||
}
|
||||
|
||||
if allowUnavailable {
|
||||
return coll.Clone(), nil
|
||||
}
|
||||
|
||||
if !coll.Available() {
|
||||
// use coll.Name to match error message of regression. TODO: remove this after error code is ready.
|
||||
return nil, common.NewCollectionNotExistError(fmt.Sprintf("can't find collection: %s", coll.Name))
|
||||
}
|
||||
|
@ -340,12 +355,12 @@ func (mt *MetaTable) GetCollectionByName(ctx context.Context, collectionName str
|
|||
|
||||
collectionID, ok := mt.collAlias2ID[collectionName]
|
||||
if ok {
|
||||
return mt.getCollectionByIDInternal(ctx, collectionID, ts)
|
||||
return mt.getCollectionByIDInternal(ctx, collectionID, ts, false)
|
||||
}
|
||||
|
||||
collectionID, ok = mt.collName2ID[collectionName]
|
||||
if ok {
|
||||
return mt.getCollectionByIDInternal(ctx, collectionID, ts)
|
||||
return mt.getCollectionByIDInternal(ctx, collectionID, ts, false)
|
||||
}
|
||||
|
||||
if isMaxTs(ts) {
|
||||
|
@ -364,11 +379,11 @@ func (mt *MetaTable) GetCollectionByName(ctx context.Context, collectionName str
|
|||
return filterUnavailable(coll), nil
|
||||
}
|
||||
|
||||
func (mt *MetaTable) GetCollectionByID(ctx context.Context, collectionID UniqueID, ts Timestamp) (*model.Collection, error) {
|
||||
func (mt *MetaTable) GetCollectionByID(ctx context.Context, collectionID UniqueID, ts Timestamp, allowUnavailable bool) (*model.Collection, error) {
|
||||
mt.ddLock.RLock()
|
||||
defer mt.ddLock.RUnlock()
|
||||
|
||||
return mt.getCollectionByIDInternal(ctx, collectionID, ts)
|
||||
return mt.getCollectionByIDInternal(ctx, collectionID, ts, allowUnavailable)
|
||||
}
|
||||
|
||||
func (mt *MetaTable) ListCollections(ctx context.Context, ts Timestamp) ([]*model.Collection, error) {
|
||||
|
|
|
@ -425,7 +425,7 @@ func TestMetaTable_getCollectionByIDInternal(t *testing.T) {
|
|||
collID2Meta: map[typeutil.UniqueID]*model.Collection{},
|
||||
}
|
||||
ctx := context.Background()
|
||||
_, err := meta.getCollectionByIDInternal(ctx, 100, 101)
|
||||
_, err := meta.getCollectionByIDInternal(ctx, 100, 101, false)
|
||||
assert.Error(t, err)
|
||||
})
|
||||
|
||||
|
@ -441,9 +441,12 @@ func TestMetaTable_getCollectionByIDInternal(t *testing.T) {
|
|||
collID2Meta: map[typeutil.UniqueID]*model.Collection{},
|
||||
}
|
||||
ctx := context.Background()
|
||||
_, err := meta.getCollectionByIDInternal(ctx, 100, 101)
|
||||
_, err := meta.getCollectionByIDInternal(ctx, 100, 101, false)
|
||||
assert.Error(t, err)
|
||||
assert.True(t, common.IsCollectionNotExistError(err))
|
||||
coll, err := meta.getCollectionByIDInternal(ctx, 100, 101, true)
|
||||
assert.NoError(t, err)
|
||||
assert.False(t, coll.Available())
|
||||
})
|
||||
|
||||
t.Run("normal case, filter unavailable partitions", func(t *testing.T) {
|
||||
|
@ -461,7 +464,7 @@ func TestMetaTable_getCollectionByIDInternal(t *testing.T) {
|
|||
},
|
||||
}
|
||||
ctx := context.Background()
|
||||
coll, err := meta.getCollectionByIDInternal(ctx, 100, 101)
|
||||
coll, err := meta.getCollectionByIDInternal(ctx, 100, 101, false)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 1, len(coll.Partitions))
|
||||
assert.Equal(t, UniqueID(11), coll.Partitions[0].PartitionID)
|
||||
|
@ -483,7 +486,7 @@ func TestMetaTable_getCollectionByIDInternal(t *testing.T) {
|
|||
},
|
||||
}
|
||||
ctx := context.Background()
|
||||
coll, err := meta.getCollectionByIDInternal(ctx, 100, typeutil.MaxTimestamp)
|
||||
coll, err := meta.getCollectionByIDInternal(ctx, 100, typeutil.MaxTimestamp, false)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 1, len(coll.Partitions))
|
||||
assert.Equal(t, UniqueID(11), coll.Partitions[0].PartitionID)
|
||||
|
@ -666,7 +669,7 @@ func TestMetaTable_getLatestCollectionByIDInternal(t *testing.T) {
|
|||
t.Run("not exist", func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
mt := &MetaTable{collID2Meta: nil}
|
||||
_, err := mt.getLatestCollectionByIDInternal(ctx, 100)
|
||||
_, err := mt.getLatestCollectionByIDInternal(ctx, 100, false)
|
||||
assert.Error(t, err)
|
||||
assert.True(t, common.IsCollectionNotExistError(err))
|
||||
})
|
||||
|
@ -676,7 +679,7 @@ func TestMetaTable_getLatestCollectionByIDInternal(t *testing.T) {
|
|||
mt := &MetaTable{collID2Meta: map[typeutil.UniqueID]*model.Collection{
|
||||
100: nil,
|
||||
}}
|
||||
_, err := mt.getLatestCollectionByIDInternal(ctx, 100)
|
||||
_, err := mt.getLatestCollectionByIDInternal(ctx, 100, false)
|
||||
assert.Error(t, err)
|
||||
assert.True(t, common.IsCollectionNotExistError(err))
|
||||
})
|
||||
|
@ -686,9 +689,12 @@ func TestMetaTable_getLatestCollectionByIDInternal(t *testing.T) {
|
|||
mt := &MetaTable{collID2Meta: map[typeutil.UniqueID]*model.Collection{
|
||||
100: {State: pb.CollectionState_CollectionDropping},
|
||||
}}
|
||||
_, err := mt.getLatestCollectionByIDInternal(ctx, 100)
|
||||
_, err := mt.getLatestCollectionByIDInternal(ctx, 100, false)
|
||||
assert.Error(t, err)
|
||||
assert.True(t, common.IsCollectionNotExistError(err))
|
||||
coll, err := mt.getLatestCollectionByIDInternal(ctx, 100, true)
|
||||
assert.NoError(t, err)
|
||||
assert.False(t, coll.Available())
|
||||
})
|
||||
|
||||
t.Run("normal case", func(t *testing.T) {
|
||||
|
@ -702,7 +708,7 @@ func TestMetaTable_getLatestCollectionByIDInternal(t *testing.T) {
|
|||
},
|
||||
},
|
||||
}}
|
||||
coll, err := mt.getLatestCollectionByIDInternal(ctx, 100)
|
||||
coll, err := mt.getLatestCollectionByIDInternal(ctx, 100, false)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 1, len(coll.Partitions))
|
||||
})
|
||||
|
|
|
@ -37,7 +37,7 @@ type mockMetaTable struct {
|
|||
ListCollectionsFunc func(ctx context.Context, ts Timestamp) ([]*model.Collection, error)
|
||||
AddCollectionFunc func(ctx context.Context, coll *model.Collection) error
|
||||
GetCollectionByNameFunc func(ctx context.Context, collectionName string, ts Timestamp) (*model.Collection, error)
|
||||
GetCollectionByIDFunc func(ctx context.Context, collectionID UniqueID, ts Timestamp) (*model.Collection, error)
|
||||
GetCollectionByIDFunc func(ctx context.Context, collectionID UniqueID, ts Timestamp, allowUnavailable bool) (*model.Collection, error)
|
||||
ChangeCollectionStateFunc func(ctx context.Context, collectionID UniqueID, state pb.CollectionState, ts Timestamp) error
|
||||
RemoveCollectionFunc func(ctx context.Context, collectionID UniqueID, ts Timestamp) error
|
||||
AddPartitionFunc func(ctx context.Context, partition *model.Partition) error
|
||||
|
@ -66,8 +66,8 @@ func (m mockMetaTable) GetCollectionByName(ctx context.Context, collectionName s
|
|||
return m.GetCollectionByNameFunc(ctx, collectionName, ts)
|
||||
}
|
||||
|
||||
func (m mockMetaTable) GetCollectionByID(ctx context.Context, collectionID UniqueID, ts Timestamp) (*model.Collection, error) {
|
||||
return m.GetCollectionByIDFunc(ctx, collectionID, ts)
|
||||
func (m mockMetaTable) GetCollectionByID(ctx context.Context, collectionID UniqueID, ts Timestamp, allowUnavailable bool) (*model.Collection, error) {
|
||||
return m.GetCollectionByIDFunc(ctx, collectionID, ts, allowUnavailable)
|
||||
}
|
||||
|
||||
func (m mockMetaTable) ChangeCollectionState(ctx context.Context, collectionID UniqueID, state pb.CollectionState, ts Timestamp) error {
|
||||
|
@ -360,7 +360,7 @@ func withInvalidMeta() Opt {
|
|||
meta.GetCollectionByNameFunc = func(ctx context.Context, collectionName string, ts Timestamp) (*model.Collection, error) {
|
||||
return nil, errors.New("error mock GetCollectionByName")
|
||||
}
|
||||
meta.GetCollectionByIDFunc = func(ctx context.Context, collectionID typeutil.UniqueID, ts Timestamp) (*model.Collection, error) {
|
||||
meta.GetCollectionByIDFunc = func(ctx context.Context, collectionID typeutil.UniqueID, ts Timestamp, allowUnavailable bool) (*model.Collection, error) {
|
||||
return nil, errors.New("error mock GetCollectionByID")
|
||||
}
|
||||
meta.AddPartitionFunc = func(ctx context.Context, partition *model.Partition) error {
|
||||
|
|
|
@ -216,13 +216,13 @@ func (_m *IMetaTable) DropRole(tenant string, roleName string) error {
|
|||
return r0
|
||||
}
|
||||
|
||||
// GetCollectionByID provides a mock function with given fields: ctx, collectionID, ts
|
||||
func (_m *IMetaTable) GetCollectionByID(ctx context.Context, collectionID int64, ts uint64) (*model.Collection, error) {
|
||||
ret := _m.Called(ctx, collectionID, ts)
|
||||
// GetCollectionByID provides a mock function with given fields: ctx, collectionID, ts, allowUnavailable
|
||||
func (_m *IMetaTable) GetCollectionByID(ctx context.Context, collectionID int64, ts uint64, allowUnavailable bool) (*model.Collection, error) {
|
||||
ret := _m.Called(ctx, collectionID, ts, allowUnavailable)
|
||||
|
||||
var r0 *model.Collection
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, uint64) *model.Collection); ok {
|
||||
r0 = rf(ctx, collectionID, ts)
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, uint64, bool) *model.Collection); ok {
|
||||
r0 = rf(ctx, collectionID, ts, allowUnavailable)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Collection)
|
||||
|
@ -230,8 +230,8 @@ func (_m *IMetaTable) GetCollectionByID(ctx context.Context, collectionID int64,
|
|||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, int64, uint64) error); ok {
|
||||
r1 = rf(ctx, collectionID, ts)
|
||||
if rf, ok := ret.Get(1).(func(context.Context, int64, uint64, bool) error); ok {
|
||||
r1 = rf(ctx, collectionID, ts, allowUnavailable)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
|
|
@ -906,12 +906,12 @@ func (c *Core) HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequ
|
|||
return t.Rsp, nil
|
||||
}
|
||||
|
||||
func (c *Core) describeCollection(ctx context.Context, in *milvuspb.DescribeCollectionRequest) (*model.Collection, error) {
|
||||
func (c *Core) describeCollection(ctx context.Context, in *milvuspb.DescribeCollectionRequest, allowUnavailable bool) (*model.Collection, error) {
|
||||
ts := getTravelTs(in)
|
||||
if in.GetCollectionName() != "" {
|
||||
return c.meta.GetCollectionByName(ctx, in.GetCollectionName(), ts)
|
||||
}
|
||||
return c.meta.GetCollectionByID(ctx, in.GetCollectionID(), ts)
|
||||
return c.meta.GetCollectionByID(ctx, in.GetCollectionID(), ts, allowUnavailable)
|
||||
}
|
||||
|
||||
func convertModelToDesc(collInfo *model.Collection, aliases []string) *milvuspb.DescribeCollectionResponse {
|
||||
|
@ -942,8 +942,7 @@ func convertModelToDesc(collInfo *model.Collection, aliases []string) *milvuspb.
|
|||
return resp
|
||||
}
|
||||
|
||||
// DescribeCollection return collection info
|
||||
func (c *Core) DescribeCollection(ctx context.Context, in *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
func (c *Core) describeCollectionImpl(ctx context.Context, in *milvuspb.DescribeCollectionRequest, allowUnavailable bool) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
if code, ok := c.checkHealthy(); !ok {
|
||||
return &milvuspb.DescribeCollectionResponse{
|
||||
Status: failStatus(commonpb.ErrorCode_UnexpectedError, "StateCode"+commonpb.StateCode_name[int32(code)]),
|
||||
|
@ -954,16 +953,21 @@ func (c *Core) DescribeCollection(ctx context.Context, in *milvuspb.DescribeColl
|
|||
tr := timerecord.NewTimeRecorder("DescribeCollection")
|
||||
|
||||
ts := getTravelTs(in)
|
||||
log := log.Ctx(ctx).With(zap.String("collection name", in.GetCollectionName()), zap.Int64("id", in.GetCollectionID()), zap.Int64("msgID", in.GetBase().GetMsgID()), zap.Uint64("ts", ts))
|
||||
log := log.Ctx(ctx).With(zap.String("collection name", in.GetCollectionName()),
|
||||
zap.Int64("id", in.GetCollectionID()),
|
||||
zap.Int64("msgID", in.GetBase().GetMsgID()),
|
||||
zap.Uint64("ts", ts),
|
||||
zap.Bool("allowUnavailable", allowUnavailable))
|
||||
|
||||
// TODO(longjiquan): log may be very frequent here.
|
||||
|
||||
log.Info("received request to describe collection")
|
||||
|
||||
t := &describeCollectionTask{
|
||||
baseTask: newBaseTask(ctx, c),
|
||||
Req: in,
|
||||
Rsp: &milvuspb.DescribeCollectionResponse{},
|
||||
baseTask: newBaseTask(ctx, c),
|
||||
Req: in,
|
||||
Rsp: &milvuspb.DescribeCollectionResponse{},
|
||||
allowUnavailable: allowUnavailable,
|
||||
}
|
||||
|
||||
if err := c.scheduler.AddTask(t); err != nil {
|
||||
|
@ -972,6 +976,7 @@ func (c *Core) DescribeCollection(ctx context.Context, in *milvuspb.DescribeColl
|
|||
return &milvuspb.DescribeCollectionResponse{
|
||||
// TODO: use commonpb.ErrorCode_CollectionNotExists. SDK use commonpb.ErrorCode_UnexpectedError now.
|
||||
Status: failStatus(commonpb.ErrorCode_UnexpectedError, err.Error()),
|
||||
// Status: common.StatusFromError(err),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -981,6 +986,7 @@ func (c *Core) DescribeCollection(ctx context.Context, in *milvuspb.DescribeColl
|
|||
return &milvuspb.DescribeCollectionResponse{
|
||||
// TODO: use commonpb.ErrorCode_CollectionNotExists. SDK use commonpb.ErrorCode_UnexpectedError now.
|
||||
Status: failStatus(commonpb.ErrorCode_UnexpectedError, err.Error()),
|
||||
// Status: common.StatusFromError(err),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -992,6 +998,21 @@ func (c *Core) DescribeCollection(ctx context.Context, in *milvuspb.DescribeColl
|
|||
return t.Rsp, nil
|
||||
}
|
||||
|
||||
// DescribeCollection return collection info
|
||||
func (c *Core) DescribeCollection(ctx context.Context, in *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
return c.describeCollectionImpl(ctx, in, false)
|
||||
}
|
||||
|
||||
// DescribeCollectionInternal same to DescribeCollection, but will return unavailable collections and
|
||||
// only used in internal RPC.
|
||||
// When query cluster tried to do recovery, it'll be healthy until all collections' targets were recovered,
|
||||
// so during this time, releasing request generated by rootcoord's recovery won't succeed. So in theory, rootcoord goes
|
||||
// to be healthy, querycoord recovers all collections' targets, and then querycoord serves the releasing request sent
|
||||
// by rootcoord, eventually, the dropping collections will be released.
|
||||
func (c *Core) DescribeCollectionInternal(ctx context.Context, in *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
return c.describeCollectionImpl(ctx, in, true)
|
||||
}
|
||||
|
||||
// ShowCollections list all collection names
|
||||
func (c *Core) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
|
||||
if code, ok := c.checkHealthy(); !ok {
|
||||
|
@ -1240,8 +1261,7 @@ func (c *Core) HasPartition(ctx context.Context, in *milvuspb.HasPartitionReques
|
|||
return t.Rsp, nil
|
||||
}
|
||||
|
||||
// ShowPartitions list all partition names
|
||||
func (c *Core) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
func (c *Core) showPartitionsImpl(ctx context.Context, in *milvuspb.ShowPartitionsRequest, allowUnavailable bool) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
if code, ok := c.checkHealthy(); !ok {
|
||||
return &milvuspb.ShowPartitionsResponse{
|
||||
Status: failStatus(commonpb.ErrorCode_UnexpectedError, "StateCode="+commonpb.StateCode_name[int32(code)]),
|
||||
|
@ -1251,14 +1271,18 @@ func (c *Core) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRe
|
|||
metrics.RootCoordDDLReqCounter.WithLabelValues("ShowPartitions", metrics.TotalLabel).Inc()
|
||||
tr := timerecord.NewTimeRecorder("ShowPartitions")
|
||||
|
||||
log := log.Ctx(ctx).With(zap.String("collection", in.GetCollectionName()), zap.Int64("msgID", in.GetBase().GetMsgID()))
|
||||
log := log.Ctx(ctx).With(
|
||||
zap.String("collection", in.GetCollectionName()),
|
||||
zap.Int64("msgID", in.GetBase().GetMsgID()),
|
||||
zap.Bool("allowUnavailable", allowUnavailable))
|
||||
|
||||
log.Info("received request to show partitions")
|
||||
|
||||
t := &showPartitionTask{
|
||||
baseTask: newBaseTask(ctx, c),
|
||||
Req: in,
|
||||
Rsp: &milvuspb.ShowPartitionsResponse{},
|
||||
baseTask: newBaseTask(ctx, c),
|
||||
Req: in,
|
||||
Rsp: &milvuspb.ShowPartitionsResponse{},
|
||||
allowUnavailable: allowUnavailable,
|
||||
}
|
||||
|
||||
if err := c.scheduler.AddTask(t); err != nil {
|
||||
|
@ -1266,6 +1290,7 @@ func (c *Core) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRe
|
|||
metrics.RootCoordDDLReqCounter.WithLabelValues("ShowPartitions", metrics.FailLabel).Inc()
|
||||
return &milvuspb.ShowPartitionsResponse{
|
||||
Status: failStatus(commonpb.ErrorCode_UnexpectedError, "ShowPartitions failed: "+err.Error()),
|
||||
// Status: common.StatusFromError(err),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -1274,6 +1299,7 @@ func (c *Core) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRe
|
|||
metrics.RootCoordDDLReqCounter.WithLabelValues("ShowPartitions", metrics.FailLabel).Inc()
|
||||
return &milvuspb.ShowPartitionsResponse{
|
||||
Status: failStatus(commonpb.ErrorCode_UnexpectedError, "ShowPartitions failed: "+err.Error()),
|
||||
// Status: common.StatusFromError(err),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -1285,6 +1311,16 @@ func (c *Core) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRe
|
|||
return t.Rsp, nil
|
||||
}
|
||||
|
||||
// ShowPartitions list all partition names
|
||||
func (c *Core) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
return c.showPartitionsImpl(ctx, in, false)
|
||||
}
|
||||
|
||||
// ShowPartitionsInternal same to ShowPartitions, only used in internal RPC.
|
||||
func (c *Core) ShowPartitionsInternal(ctx context.Context, in *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
return c.showPartitionsImpl(ctx, in, true)
|
||||
}
|
||||
|
||||
// ShowSegments list all segments
|
||||
func (c *Core) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) {
|
||||
// ShowSegments Only used in GetPersistentSegmentInfo, it's already deprecated for a long time.
|
||||
|
|
|
@ -313,6 +313,9 @@ func TestRootCoord_DescribeCollection(t *testing.T) {
|
|||
resp, err := c.DescribeCollection(ctx, &milvuspb.DescribeCollectionRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
resp, err = c.DescribeCollectionInternal(ctx, &milvuspb.DescribeCollectionRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
})
|
||||
|
||||
t.Run("failed to add task", func(t *testing.T) {
|
||||
|
@ -323,6 +326,9 @@ func TestRootCoord_DescribeCollection(t *testing.T) {
|
|||
resp, err := c.DescribeCollection(ctx, &milvuspb.DescribeCollectionRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
resp, err = c.DescribeCollectionInternal(ctx, &milvuspb.DescribeCollectionRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
})
|
||||
|
||||
t.Run("failed to execute", func(t *testing.T) {
|
||||
|
@ -333,6 +339,9 @@ func TestRootCoord_DescribeCollection(t *testing.T) {
|
|||
resp, err := c.DescribeCollection(ctx, &milvuspb.DescribeCollectionRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
resp, err = c.DescribeCollectionInternal(ctx, &milvuspb.DescribeCollectionRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
})
|
||||
|
||||
t.Run("normal case, everything is ok", func(t *testing.T) {
|
||||
|
@ -343,6 +352,9 @@ func TestRootCoord_DescribeCollection(t *testing.T) {
|
|||
resp, err := c.DescribeCollection(ctx, &milvuspb.DescribeCollectionRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
resp, err = c.DescribeCollectionInternal(ctx, &milvuspb.DescribeCollectionRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -473,6 +485,9 @@ func TestRootCoord_ShowPartitions(t *testing.T) {
|
|||
resp, err := c.ShowPartitions(ctx, &milvuspb.ShowPartitionsRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
resp, err = c.ShowPartitionsInternal(ctx, &milvuspb.ShowPartitionsRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
})
|
||||
|
||||
t.Run("failed to add task", func(t *testing.T) {
|
||||
|
@ -483,6 +498,9 @@ func TestRootCoord_ShowPartitions(t *testing.T) {
|
|||
resp, err := c.ShowPartitions(ctx, &milvuspb.ShowPartitionsRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
resp, err = c.ShowPartitionsInternal(ctx, &milvuspb.ShowPartitionsRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
})
|
||||
|
||||
t.Run("failed to execute", func(t *testing.T) {
|
||||
|
@ -492,6 +510,9 @@ func TestRootCoord_ShowPartitions(t *testing.T) {
|
|||
resp, err := c.ShowPartitions(ctx, &milvuspb.ShowPartitionsRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
resp, err = c.ShowPartitionsInternal(ctx, &milvuspb.ShowPartitionsRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
})
|
||||
|
||||
t.Run("normal case, everything is ok", func(t *testing.T) {
|
||||
|
@ -501,6 +522,9 @@ func TestRootCoord_ShowPartitions(t *testing.T) {
|
|||
resp, err := c.ShowPartitions(ctx, &milvuspb.ShowPartitionsRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
resp, err = c.ShowPartitionsInternal(ctx, &milvuspb.ShowPartitionsRequest{})
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -1360,7 +1384,7 @@ func TestRootcoord_EnableActiveStandby(t *testing.T) {
|
|||
},
|
||||
CollectionName: "unexist"})
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, commonpb.ErrorCode_UnexpectedError, resp.GetStatus().GetErrorCode())
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||
err = core.Stop()
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
|
|
@ -13,8 +13,9 @@ import (
|
|||
// showPartitionTask show partition request task
|
||||
type showPartitionTask struct {
|
||||
baseTask
|
||||
Req *milvuspb.ShowPartitionsRequest
|
||||
Rsp *milvuspb.ShowPartitionsResponse
|
||||
Req *milvuspb.ShowPartitionsRequest
|
||||
Rsp *milvuspb.ShowPartitionsResponse
|
||||
allowUnavailable bool
|
||||
}
|
||||
|
||||
func (t *showPartitionTask) Prepare(ctx context.Context) error {
|
||||
|
@ -30,7 +31,7 @@ func (t *showPartitionTask) Execute(ctx context.Context) error {
|
|||
var err error
|
||||
t.Rsp.Status = succStatus()
|
||||
if t.Req.GetCollectionName() == "" {
|
||||
coll, err = t.core.meta.GetCollectionByID(ctx, t.Req.GetCollectionID(), typeutil.MaxTimestamp)
|
||||
coll, err = t.core.meta.GetCollectionByID(ctx, t.Req.GetCollectionID(), typeutil.MaxTimestamp, t.allowUnavailable)
|
||||
} else {
|
||||
coll, err = t.core.meta.GetCollectionByName(ctx, t.Req.GetCollectionName(), typeutil.MaxTimestamp)
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ func Test_showPartitionTask_Execute(t *testing.T) {
|
|||
|
||||
t.Run("success", func(t *testing.T) {
|
||||
meta := newMockMetaTable()
|
||||
meta.GetCollectionByIDFunc = func(ctx context.Context, collectionID typeutil.UniqueID, ts Timestamp) (*model.Collection, error) {
|
||||
meta.GetCollectionByIDFunc = func(ctx context.Context, collectionID typeutil.UniqueID, ts Timestamp, allowUnavailable bool) (*model.Collection, error) {
|
||||
return &model.Collection{
|
||||
CollectionID: collectionID,
|
||||
Name: "test coll",
|
||||
|
|
|
@ -499,6 +499,10 @@ type RootCoord interface {
|
|||
// error is always nil
|
||||
DescribeCollection(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)
|
||||
|
||||
// DescribeCollectionInternal same to DescribeCollection, only used in internal RPC.
|
||||
// Besides, it'll also return unavailable collection, for example, creating, dropping.
|
||||
DescribeCollectionInternal(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)
|
||||
|
||||
// ShowCollections notifies RootCoord to list all collection names and other info in database at specified timestamp
|
||||
//
|
||||
// ctx is the context to control request deadline and cancellation
|
||||
|
@ -563,6 +567,9 @@ type RootCoord interface {
|
|||
// error is always nil
|
||||
ShowPartitions(ctx context.Context, req *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)
|
||||
|
||||
// ShowPartitionsInternal same to ShowPartitions, but will return unavailable resources and only used in internal.
|
||||
ShowPartitionsInternal(ctx context.Context, req *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)
|
||||
|
||||
// CreateIndex notifies RootCoord to create an index for the specified field in the collection
|
||||
//
|
||||
// ctx is the context to control request deadline and cancellation
|
||||
|
|
|
@ -97,6 +97,10 @@ func (m *GrpcRootCoordClient) DescribeCollection(ctx context.Context, in *milvus
|
|||
return &milvuspb.DescribeCollectionResponse{}, m.Err
|
||||
}
|
||||
|
||||
func (m *GrpcRootCoordClient) DescribeCollectionInternal(ctx context.Context, in *milvuspb.DescribeCollectionRequest, opts ...grpc.CallOption) (*milvuspb.DescribeCollectionResponse, error) {
|
||||
return &milvuspb.DescribeCollectionResponse{}, m.Err
|
||||
}
|
||||
|
||||
func (m *GrpcRootCoordClient) CreateAlias(ctx context.Context, in *milvuspb.CreateAliasRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
||||
return &commonpb.Status{}, m.Err
|
||||
}
|
||||
|
@ -129,6 +133,10 @@ func (m *GrpcRootCoordClient) ShowPartitions(ctx context.Context, in *milvuspb.S
|
|||
return &milvuspb.ShowPartitionsResponse{}, m.Err
|
||||
}
|
||||
|
||||
func (m *GrpcRootCoordClient) ShowPartitionsInternal(ctx context.Context, in *milvuspb.ShowPartitionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionsResponse, error) {
|
||||
return &milvuspb.ShowPartitionsResponse{}, m.Err
|
||||
}
|
||||
|
||||
func (m *GrpcRootCoordClient) DescribeSegment(ctx context.Context, in *milvuspb.DescribeSegmentRequest, opts ...grpc.CallOption) (*milvuspb.DescribeSegmentResponse, error) {
|
||||
return &milvuspb.DescribeSegmentResponse{}, m.Err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue