Update masterservice unittest

Signed-off-by: neza2017 <yefu.chen@zilliz.com>
This commit is contained in:
neza2017 2021-03-05 20:41:34 +08:00 committed by yefu.chen
parent e5d595564a
commit 2835bcdc4e
21 changed files with 366 additions and 375 deletions

View File

@ -232,7 +232,7 @@ const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE(
"\010msg_type\030\001 \001(\0162\034.milvus.proto.common.Ms" "\010msg_type\030\001 \001(\0162\034.milvus.proto.common.Ms"
"gType\022\r\n\005msgID\030\002 \001(\003\022\021\n\ttimestamp\030\003 \001(\004\022" "gType\022\r\n\005msgID\030\002 \001(\003\022\021\n\ttimestamp\030\003 \001(\004\022"
"\020\n\010sourceID\030\004 \001(\003\"7\n\tMsgHeader\022*\n\004base\030\001" "\020\n\010sourceID\030\004 \001(\003\"7\n\tMsgHeader\022*\n\004base\030\001"
" \001(\0132\034.milvus.proto.common.MsgBase*\270\004\n\tE" " \001(\0132\034.milvus.proto.common.MsgBase*\315\004\n\tE"
"rrorCode\022\013\n\007SUCCESS\020\000\022\024\n\020UNEXPECTED_ERRO" "rrorCode\022\013\n\007SUCCESS\020\000\022\024\n\020UNEXPECTED_ERRO"
"R\020\001\022\022\n\016CONNECT_FAILED\020\002\022\025\n\021PERMISSION_DE" "R\020\001\022\022\n\016CONNECT_FAILED\020\002\022\025\n\021PERMISSION_DE"
"NIED\020\003\022\031\n\025COLLECTION_NOT_EXISTS\020\004\022\024\n\020ILL" "NIED\020\003\022\031\n\025COLLECTION_NOT_EXISTS\020\004\022\024\n\020ILL"
@ -246,34 +246,35 @@ const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE(
"_FILE\020\022\022\030\n\024CANNOT_DELETE_FOLDER\020\023\022\026\n\022CAN" "_FILE\020\022\022\030\n\024CANNOT_DELETE_FOLDER\020\023\022\026\n\022CAN"
"NOT_DELETE_FILE\020\024\022\025\n\021BUILD_INDEX_ERROR\020\025" "NOT_DELETE_FILE\020\024\022\025\n\021BUILD_INDEX_ERROR\020\025"
"\022\021\n\rILLEGAL_NLIST\020\026\022\027\n\023ILLEGAL_METRIC_TY" "\022\021\n\rILLEGAL_NLIST\020\026\022\027\n\023ILLEGAL_METRIC_TY"
"PE\020\027\022\021\n\rOUT_OF_MEMORY\020\030\022\024\n\017DD_REQUEST_RA" "PE\020\027\022\021\n\rOUT_OF_MEMORY\020\030\022\023\n\017INDEX_NOT_EXI"
"CE\020\350\007*[\n\nIndexState\022\010\n\004NONE\020\000\022\014\n\010UNISSUE" "ST\020\031\022\024\n\017DD_REQUEST_RACE\020\350\007*[\n\nIndexState"
"D\020\001\022\016\n\nINPROGRESS\020\002\022\014\n\010FINISHED\020\003\022\n\n\006FAI" "\022\010\n\004NONE\020\000\022\014\n\010UNISSUED\020\001\022\016\n\nINPROGRESS\020\002"
"LED\020\004\022\013\n\007DELETED\020\005*o\n\014SegmentState\022\017\n\013Se" "\022\014\n\010FINISHED\020\003\022\n\n\006FAILED\020\004\022\013\n\007DELETED\020\005*"
"gmentNone\020\000\022\023\n\017SegmentNotExist\020\001\022\022\n\016Segm" "o\n\014SegmentState\022\017\n\013SegmentNone\020\000\022\023\n\017Segm"
"entGrowing\020\002\022\021\n\rSegmentSealed\020\003\022\022\n\016Segme" "entNotExist\020\001\022\022\n\016SegmentGrowing\020\002\022\021\n\rSeg"
"ntFlushed\020\004*\225\006\n\007MsgType\022\t\n\005kNone\020\000\022\025\n\021kC" "mentSealed\020\003\022\022\n\016SegmentFlushed\020\004*\225\006\n\007Msg"
"reateCollection\020d\022\023\n\017kDropCollection\020e\022\022" "Type\022\t\n\005kNone\020\000\022\025\n\021kCreateCollection\020d\022\023"
"\n\016kHasCollection\020f\022\027\n\023kDescribeCollectio" "\n\017kDropCollection\020e\022\022\n\016kHasCollection\020f\022"
"n\020g\022\024\n\020kShowCollections\020h\022\022\n\016kGetSysConf" "\027\n\023kDescribeCollection\020g\022\024\n\020kShowCollect"
"igs\020i\022\023\n\017kLoadCollection\020j\022\026\n\022kReleaseCo" "ions\020h\022\022\n\016kGetSysConfigs\020i\022\023\n\017kLoadColle"
"llection\020k\022\025\n\020kCreatePartition\020\310\001\022\023\n\016kDr" "ction\020j\022\026\n\022kReleaseCollection\020k\022\025\n\020kCrea"
"opPartition\020\311\001\022\022\n\rkHasPartition\020\312\001\022\027\n\022kD" "tePartition\020\310\001\022\023\n\016kDropPartition\020\311\001\022\022\n\rk"
"escribePartition\020\313\001\022\024\n\017kShowPartitions\020\314" "HasPartition\020\312\001\022\027\n\022kDescribePartition\020\313\001"
"\001\022\023\n\016kLoadPartition\020\315\001\022\026\n\021kReleasePartit" "\022\024\n\017kShowPartitions\020\314\001\022\023\n\016kLoadPartition"
"ion\020\316\001\022\021\n\014kShowSegment\020\372\001\022\025\n\020kDescribeSe" "\020\315\001\022\026\n\021kReleasePartition\020\316\001\022\021\n\014kShowSegm"
"gment\020\373\001\022\021\n\014kCreateIndex\020\254\002\022\023\n\016kDescribe" "ent\020\372\001\022\025\n\020kDescribeSegment\020\373\001\022\021\n\014kCreate"
"Index\020\255\002\022\017\n\nkDropIndex\020\256\002\022\014\n\007kInsert\020\220\003\022" "Index\020\254\002\022\023\n\016kDescribeIndex\020\255\002\022\017\n\nkDropIn"
"\014\n\007kDelete\020\221\003\022\013\n\006kFlush\020\222\003\022\014\n\007kSearch\020\364\003" "dex\020\256\002\022\014\n\007kInsert\020\220\003\022\014\n\007kDelete\020\221\003\022\013\n\006kF"
"\022\022\n\rkSearchResult\020\365\003\022\023\n\016kGetIndexState\020\366" "lush\020\222\003\022\014\n\007kSearch\020\364\003\022\022\n\rkSearchResult\020\365"
"\003\022\035\n\030kGetCollectionStatistics\020\367\003\022\034\n\027kGet" "\003\022\023\n\016kGetIndexState\020\366\003\022\035\n\030kGetCollection"
"PartitionStatistics\020\370\003\022\021\n\014kSegmentInfo\020\330" "Statistics\020\367\003\022\034\n\027kGetPartitionStatistics"
"\004\022\016\n\tkTimeTick\020\260\t\022\024\n\017kQueryNodeStats\020\261\t\022" "\020\370\003\022\021\n\014kSegmentInfo\020\330\004\022\016\n\tkTimeTick\020\260\t\022\024"
"\017\n\nkLoadIndex\020\262\t\022\017\n\nkRequestID\020\263\t\022\020\n\013kRe" "\n\017kQueryNodeStats\020\261\t\022\017\n\nkLoadIndex\020\262\t\022\017\n"
"questTSO\020\264\t\022\025\n\020kAllocateSegment\020\265\t\022\027\n\022kS" "\nkRequestID\020\263\t\022\020\n\013kRequestTSO\020\264\t\022\025\n\020kAll"
"egmentStatistics\020\266\t\022\026\n\021kSegmentFlushDone" "ocateSegment\020\265\t\022\027\n\022kSegmentStatistics\020\266\t"
"\020\267\tBBZ@github.com/zilliztech/milvus-dist" "\022\026\n\021kSegmentFlushDone\020\267\tBBZ@github.com/z"
"ributed/internal/proto/commonpbb\006proto3" "illiztech/milvus-distributed/internal/pr"
"oto/commonpbb\006proto3"
; ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_common_2eproto_deps[1] = { static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_common_2eproto_deps[1] = {
}; };
@ -289,7 +290,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_com
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_common_2eproto_once; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_common_2eproto_once;
static bool descriptor_table_common_2eproto_initialized = false; static bool descriptor_table_common_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_common_2eproto = { const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_common_2eproto = {
&descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 2039, &descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 2060,
&descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_sccs, descriptor_table_common_2eproto_deps, 7, 0, &descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_sccs, descriptor_table_common_2eproto_deps, 7, 0,
schemas, file_default_instances, TableStruct_common_2eproto::offsets, schemas, file_default_instances, TableStruct_common_2eproto::offsets,
file_level_metadata_common_2eproto, 7, file_level_enum_descriptors_common_2eproto, file_level_service_descriptors_common_2eproto, file_level_metadata_common_2eproto, 7, file_level_enum_descriptors_common_2eproto, file_level_service_descriptors_common_2eproto,
@ -330,6 +331,7 @@ bool ErrorCode_IsValid(int value) {
case 22: case 22:
case 23: case 23:
case 24: case 24:
case 25:
case 1000: case 1000:
return true; return true;
default: default:

View File

@ -120,6 +120,7 @@ enum ErrorCode : int {
ILLEGAL_NLIST = 22, ILLEGAL_NLIST = 22,
ILLEGAL_METRIC_TYPE = 23, ILLEGAL_METRIC_TYPE = 23,
OUT_OF_MEMORY = 24, OUT_OF_MEMORY = 24,
INDEX_NOT_EXIST = 25,
DD_REQUEST_RACE = 1000, DD_REQUEST_RACE = 1000,
ErrorCode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), ErrorCode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(),
ErrorCode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() ErrorCode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()

View File

@ -3,21 +3,20 @@ package datanode
import ( import (
"context" "context"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb" "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/masterpb" "github.com/zilliztech/milvus-distributed/internal/proto/masterpb"
) )
type ( type allocatorInterface interface {
allocatorInterface interface {
allocID() (UniqueID, error) allocID() (UniqueID, error)
} }
type allocator struct {
allocator struct { masterService types.MasterService
masterService MasterServiceInterface
} }
)
func newAllocator(s MasterServiceInterface) *allocator { func newAllocator(s types.MasterService) *allocator {
return &allocator{ return &allocator{
masterService: s, masterService: s,
} }

View File

@ -13,43 +13,20 @@ import (
"github.com/zilliztech/milvus-distributed/internal/log" "github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/msgstream" "github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb" "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb" "github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2" "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/masterpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb" "github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
) )
const ( const (
RPCConnectionTimeout = 30 * time.Second RPCConnectionTimeout = 30 * time.Second
) )
type ( type DataNode struct {
Interface interface {
typeutil.Service
typeutil.Component
WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelRequest) (*commonpb.Status, error)
FlushSegments(ctx context.Context, in *datapb.FlushSegRequest) error
SetMasterServiceInterface(ctx context.Context, ms MasterServiceInterface) error
SetDataServiceInterface(ctx context.Context, ds DataServiceInterface) error
}
DataServiceInterface interface {
GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error)
RegisterNode(ctx context.Context, req *datapb.RegisterNodeRequest) (*datapb.RegisterNodeResponse, error)
}
MasterServiceInterface interface {
GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error)
AllocID(ctx context.Context, in *masterpb.IDRequest) (*masterpb.IDResponse, error)
ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionRequest) (*milvuspb.ShowCollectionResponse, error)
DescribeCollection(ctx context.Context, in *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)
}
DataNode struct {
ctx context.Context ctx context.Context
cancel context.CancelFunc cancel context.CancelFunc
NodeID UniqueID NodeID UniqueID
@ -60,8 +37,8 @@ type (
dataSyncService *dataSyncService dataSyncService *dataSyncService
metaService *metaService metaService *metaService
masterService MasterServiceInterface masterService types.MasterService
dataService DataServiceInterface dataService types.DataService
flushChan chan *flushMsg flushChan chan *flushMsg
replica Replica replica Replica
@ -70,7 +47,6 @@ type (
msFactory msgstream.Factory msFactory msgstream.Factory
} }
)
func NewDataNode(ctx context.Context, factory msgstream.Factory) *DataNode { func NewDataNode(ctx context.Context, factory msgstream.Factory) *DataNode {
@ -92,7 +68,7 @@ func NewDataNode(ctx context.Context, factory msgstream.Factory) *DataNode {
return node return node
} }
func (node *DataNode) SetMasterServiceInterface(ctx context.Context, ms MasterServiceInterface) error { func (node *DataNode) SetMasterServiceInterface(ms types.MasterService) error {
switch { switch {
case ms == nil, node.masterService != nil: case ms == nil, node.masterService != nil:
return errors.New("Nil parameter or repeatly set") return errors.New("Nil parameter or repeatly set")
@ -102,7 +78,7 @@ func (node *DataNode) SetMasterServiceInterface(ctx context.Context, ms MasterSe
} }
} }
func (node *DataNode) SetDataServiceInterface(ctx context.Context, ds DataServiceInterface) error { func (node *DataNode) SetDataServiceInterface(ds types.DataService) error {
switch { switch {
case ds == nil, node.dataService != nil: case ds == nil, node.dataService != nil:
return errors.New("Nil parameter or repeatly set") return errors.New("Nil parameter or repeatly set")

View File

@ -14,9 +14,10 @@ import (
"go.uber.org/zap" "go.uber.org/zap"
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd" etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
"github.com/zilliztech/milvus-distributed/internal/log" "github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/msgstream" "github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb" "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/etcdpb" "github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2" "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
@ -91,27 +92,26 @@ func clearEtcd(rootPath string) error {
} }
type ( type Factory interface {
Factory interface {
} }
MetaFactory struct { type MetaFactory struct {
} }
DataFactory struct { type DataFactory struct {
rawData []byte rawData []byte
} }
AllocatorFactory struct { type AllocatorFactory struct {
ID UniqueID ID UniqueID
} }
MasterServiceFactory struct { type MasterServiceFactory struct {
types.MasterService
ID UniqueID ID UniqueID
collectionName string collectionName string
collectionID UniqueID collectionID UniqueID
} }
)
func (mf *MetaFactory) CollectionMetaFactory(collectionID UniqueID, collectionName string) *etcdpb.CollectionMeta { func (mf *MetaFactory) CollectionMetaFactory(collectionID UniqueID, collectionName string) *etcdpb.CollectionMeta {
sch := schemapb.CollectionSchema{ sch := schemapb.CollectionSchema{

View File

@ -8,6 +8,8 @@ import (
"go.uber.org/zap" "go.uber.org/zap"
"github.com/zilliztech/milvus-distributed/internal/log" "github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb" "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/etcdpb" "github.com/zilliztech/milvus-distributed/internal/proto/etcdpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb" "github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
@ -16,10 +18,10 @@ import (
type metaService struct { type metaService struct {
ctx context.Context ctx context.Context
replica Replica replica Replica
masterClient MasterServiceInterface masterClient types.MasterService
} }
func newMetaService(ctx context.Context, replica Replica, m MasterServiceInterface) *metaService { func newMetaService(ctx context.Context, replica Replica, m types.MasterService) *metaService {
return &metaService{ return &metaService{
ctx: ctx, ctx: ctx,
replica: replica, replica: replica,

View File

@ -7,9 +7,9 @@ type (
Timestamp = typeutil.Timestamp Timestamp = typeutil.Timestamp
IntPrimaryKey = typeutil.IntPrimaryKey IntPrimaryKey = typeutil.IntPrimaryKey
DSL = string DSL = string
)
TimeRange struct { type TimeRange struct {
timestampMin Timestamp timestampMin Timestamp
timestampMax Timestamp timestampMax Timestamp
} }
)

View File

@ -3,6 +3,8 @@ package dataservice
import ( import (
"context" "context"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb" "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/masterpb" "github.com/zilliztech/milvus-distributed/internal/proto/masterpb"
) )
@ -13,10 +15,10 @@ type allocatorInterface interface {
} }
type allocator struct { type allocator struct {
masterClient MasterClient masterClient types.MasterService
} }
func newAllocator(masterClient MasterClient) *allocator { func newAllocator(masterClient types.MasterService) *allocator {
return &allocator{ return &allocator{
masterClient: masterClient, masterClient: masterClient,
} }

View File

@ -8,29 +8,27 @@ import (
"go.uber.org/zap" "go.uber.org/zap"
"github.com/zilliztech/milvus-distributed/internal/log" "github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb" "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb" "github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2" "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
) )
type ( type dataNode struct {
dataNode struct {
id int64 id int64
address struct { address struct {
ip string ip string
port int64 port int64
} }
client DataNodeClient client types.DataNode
channelNum int channelNum int
} }
dataNodeCluster struct { type dataNodeCluster struct {
mu sync.RWMutex mu sync.RWMutex
finishCh chan struct{} finishCh chan struct{}
nodes []*dataNode nodes []*dataNode
} }
)
func (node *dataNode) String() string { func (node *dataNode) String() string {
return fmt.Sprintf("id: %d, address: %s:%d", node.id, node.address.ip, node.address.port) return fmt.Sprintf("id: %d, address: %s:%d", node.id, node.address.ip, node.address.port)
@ -114,7 +112,7 @@ func (c *dataNodeCluster) GetDataNodeStates(ctx context.Context) ([]*internalpb2
defer c.mu.RUnlock() defer c.mu.RUnlock()
ret := make([]*internalpb2.ComponentInfo, 0) ret := make([]*internalpb2.ComponentInfo, 0)
for _, node := range c.nodes { for _, node := range c.nodes {
states, err := node.client.GetComponentStates(ctx, &commonpb.Empty{}) states, err := node.client.GetComponentStates(ctx)
if err != nil { if err != nil {
log.Error("get component states error", zap.Stringer("dataNode", node), zap.Error(err)) log.Error("get component states error", zap.Stringer("dataNode", node), zap.Error(err))
continue continue

View File

@ -5,36 +5,32 @@ import (
"strconv" "strconv"
"sync" "sync"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/zilliztech/milvus-distributed/internal/kv" "github.com/zilliztech/milvus-distributed/internal/kv"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
) )
type ( type errSegmentNotFound struct {
errSegmentNotFound struct {
segmentID UniqueID segmentID UniqueID
} }
errCollectionNotFound struct { type errCollectionNotFound struct {
collectionID UniqueID collectionID UniqueID
} }
collectionInfo struct { type collectionInfo struct {
ID UniqueID ID UniqueID
Schema *schemapb.CollectionSchema Schema *schemapb.CollectionSchema
Partitions []UniqueID Partitions []UniqueID
} }
meta struct { type meta struct {
client kv.TxnBase // client of a reliable kv service, i.e. etcd client client kv.TxnBase // client of a reliable kv service, i.e. etcd client
collID2Info map[UniqueID]*collectionInfo // collection id to collection info collID2Info map[UniqueID]*collectionInfo // collection id to collection info
segID2Info map[UniqueID]*datapb.SegmentInfo // segment id to segment info segID2Info map[UniqueID]*datapb.SegmentInfo // segment id to segment info
ddLock sync.RWMutex ddLock sync.RWMutex
} }
)
func newErrSegmentNotFound(segmentID UniqueID) errSegmentNotFound { func newErrSegmentNotFound(segmentID UniqueID) errSegmentNotFound {
return errSegmentNotFound{segmentID: segmentID} return errSegmentNotFound{segmentID: segmentID}

View File

@ -5,14 +5,14 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
memkv "github.com/zilliztech/milvus-distributed/internal/kv/mem"
"github.com/zilliztech/milvus-distributed/internal/util/tsoutil"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb" "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb" "github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2" "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb" "github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
memkv "github.com/zilliztech/milvus-distributed/internal/kv/mem"
"github.com/zilliztech/milvus-distributed/internal/util/tsoutil"
) )
func newMemoryMeta(allocator allocatorInterface) (*meta, error) { func newMemoryMeta(allocator allocatorInterface) (*meta, error) {
@ -55,6 +55,23 @@ func newTestSchema() *schemapb.CollectionSchema {
type mockDataNodeClient struct { type mockDataNodeClient struct {
} }
func (c *mockDataNodeClient) Init() error {
return nil
}
func (c *mockDataNodeClient) Start() error {
return nil
}
func (c *mockDataNodeClient) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
//TODO
return nil, nil
}
func (c *mockDataNodeClient) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
return nil, nil
}
func newMockDataNodeClient() *mockDataNodeClient { func newMockDataNodeClient() *mockDataNodeClient {
return &mockDataNodeClient{} return &mockDataNodeClient{}
} }
@ -63,11 +80,6 @@ func (c *mockDataNodeClient) WatchDmChannels(ctx context.Context, in *datapb.Wat
return &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS}, nil return &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS}, nil
} }
func (c *mockDataNodeClient) GetComponentStates(ctx context.Context, empty *commonpb.Empty) (*internalpb2.ComponentStates, error) {
// todo
return nil, nil
}
func (c *mockDataNodeClient) FlushSegments(ctx context.Context, in *datapb.FlushSegRequest) (*commonpb.Status, error) { func (c *mockDataNodeClient) FlushSegments(ctx context.Context, in *datapb.FlushSegRequest) (*commonpb.Status, error) {
return &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS}, nil return &commonpb.Status{ErrorCode: commonpb.ErrorCode_SUCCESS}, nil
} }

View File

@ -18,59 +18,26 @@ import (
etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd" etcdkv "github.com/zilliztech/milvus-distributed/internal/kv/etcd"
"github.com/zilliztech/milvus-distributed/internal/log" "github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/msgstream" "github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/masterpb"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/timesync" "github.com/zilliztech/milvus-distributed/internal/timesync"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/util/retry" "github.com/zilliztech/milvus-distributed/internal/util/retry"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil" "github.com/zilliztech/milvus-distributed/internal/util/typeutil"
"go.etcd.io/etcd/clientv3" "go.etcd.io/etcd/clientv3"
"go.uber.org/zap" "go.uber.org/zap"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
) )
const role = "dataservice" const role = "dataservice"
type DataService interface {
typeutil.Component
RegisterNode(ctx context.Context, req *datapb.RegisterNodeRequest) (*datapb.RegisterNodeResponse, error)
Flush(ctx context.Context, req *datapb.FlushRequest) (*commonpb.Status, error)
AssignSegmentID(ctx context.Context, req *datapb.AssignSegIDRequest) (*datapb.AssignSegIDResponse, error)
ShowSegments(ctx context.Context, req *datapb.ShowSegmentRequest) (*datapb.ShowSegmentResponse, error)
GetSegmentStates(ctx context.Context, req *datapb.SegmentStatesRequest) (*datapb.SegmentStatesResponse, error)
GetInsertBinlogPaths(ctx context.Context, req *datapb.InsertBinlogPathRequest) (*datapb.InsertBinlogPathsResponse, error)
GetSegmentInfoChannel(ctx context.Context) (*milvuspb.StringResponse, error)
GetInsertChannels(ctx context.Context, req *datapb.InsertChannelRequest) (*internalpb2.StringList, error)
GetCollectionStatistics(ctx context.Context, req *datapb.CollectionStatsRequest) (*datapb.CollectionStatsResponse, error)
GetPartitionStatistics(ctx context.Context, req *datapb.PartitionStatsRequest) (*datapb.PartitionStatsResponse, error)
GetCount(ctx context.Context, req *datapb.CollectionCountRequest) (*datapb.CollectionCountResponse, error)
GetSegmentInfo(ctx context.Context, req *datapb.SegmentInfoRequest) (*datapb.SegmentInfoResponse, error)
}
type MasterClient interface {
ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionRequest) (*milvuspb.ShowCollectionResponse, error)
DescribeCollection(ctx context.Context, in *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)
ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionRequest) (*milvuspb.ShowPartitionResponse, error)
GetDdChannel(ctx context.Context) (*milvuspb.StringResponse, error)
AllocTimestamp(ctx context.Context, in *masterpb.TsoRequest) (*masterpb.TsoResponse, error)
AllocID(ctx context.Context, in *masterpb.IDRequest) (*masterpb.IDResponse, error)
GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error)
}
type DataNodeClient interface {
WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelRequest) (*commonpb.Status, error)
GetComponentStates(ctx context.Context, empty *commonpb.Empty) (*internalpb2.ComponentStates, error)
FlushSegments(ctx context.Context, in *datapb.FlushSegRequest) (*commonpb.Status, error)
Stop() error
}
type ( type (
UniqueID = typeutil.UniqueID UniqueID = typeutil.UniqueID
Timestamp = typeutil.Timestamp Timestamp = typeutil.Timestamp
Server struct { )
type Server struct {
ctx context.Context ctx context.Context
serverLoopCtx context.Context serverLoopCtx context.Context
serverLoopCancel context.CancelFunc serverLoopCancel context.CancelFunc
@ -85,7 +52,7 @@ type (
cluster *dataNodeCluster cluster *dataNodeCluster
msgProducer *timesync.MsgProducer msgProducer *timesync.MsgProducer
registerFinishCh chan struct{} registerFinishCh chan struct{}
masterClient MasterClient masterClient types.MasterService
ttMsgStream msgstream.MsgStream ttMsgStream msgstream.MsgStream
k2sMsgStream msgstream.MsgStream k2sMsgStream msgstream.MsgStream
ddChannelName string ddChannelName string
@ -94,7 +61,6 @@ type (
msFactory msgstream.Factory msFactory msgstream.Factory
ttBarrier timesync.TimeTickBarrier ttBarrier timesync.TimeTickBarrier
} }
)
func CreateServer(ctx context.Context, factory msgstream.Factory) (*Server, error) { func CreateServer(ctx context.Context, factory msgstream.Factory) (*Server, error) {
ch := make(chan struct{}) ch := make(chan struct{})
@ -118,7 +84,7 @@ func (s *Server) getInsertChannels() []string {
return channels return channels
} }
func (s *Server) SetMasterClient(masterClient MasterClient) { func (s *Server) SetMasterClient(masterClient types.MasterService) {
s.masterClient = masterClient s.masterClient = masterClient
} }

View File

@ -11,18 +11,16 @@ import (
"github.com/zilliztech/milvus-distributed/internal/msgstream" "github.com/zilliztech/milvus-distributed/internal/msgstream"
) )
type ( type proxyTimeTickWatcher struct {
proxyTimeTickWatcher struct {
allocator segmentAllocatorInterface allocator segmentAllocatorInterface
msgQueue chan *msgstream.TimeTickMsg msgQueue chan *msgstream.TimeTickMsg
} }
dataNodeTimeTickWatcher struct { type dataNodeTimeTickWatcher struct {
meta *meta meta *meta
cluster *dataNodeCluster cluster *dataNodeCluster
allocator segmentAllocatorInterface allocator segmentAllocatorInterface
msgQueue chan *msgstream.TimeTickMsg msgQueue chan *msgstream.TimeTickMsg
} }
)
func newProxyTimeTickWatcher(allocator segmentAllocatorInterface) *proxyTimeTickWatcher { func newProxyTimeTickWatcher(allocator segmentAllocatorInterface) *proxyTimeTickWatcher {
return &proxyTimeTickWatcher{ return &proxyTimeTickWatcher{

View File

@ -7,10 +7,12 @@ import (
otgrpc "github.com/opentracing-contrib/go-grpc" otgrpc "github.com/opentracing-contrib/go-grpc"
"github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go"
"github.com/zilliztech/milvus-distributed/internal/log" "github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/util/retry"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb" "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb" "github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2" "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/util/retry" "github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"go.uber.org/zap" "go.uber.org/zap"
"google.golang.org/grpc" "google.golang.org/grpc"
@ -62,8 +64,13 @@ func (c *Client) Stop() error {
return c.conn.Close() return c.conn.Close()
} }
func (c *Client) GetComponentStates(ctx context.Context, empty *commonpb.Empty) (*internalpb2.ComponentStates, error) { func (c *Client) GetComponentStates(ctx context.Context) (*internalpb2.ComponentStates, error) {
return c.grpc.GetComponentStates(ctx, empty) return c.grpc.GetComponentStates(ctx, &commonpb.Empty{})
}
func (c *Client) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
//TODO: implement grpc GetStatisticsChannel interface
panic("implement me")
} }
func (c *Client) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelRequest) (*commonpb.Status, error) { func (c *Client) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelRequest) (*commonpb.Status, error) {

View File

@ -25,11 +25,12 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb" "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb" "github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2" "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/util/funcutil" "github.com/zilliztech/milvus-distributed/internal/util/funcutil"
) )
type Server struct { type Server struct {
impl *dn.DataNode datanode *dn.DataNode
wg sync.WaitGroup wg sync.WaitGroup
grpcErrChan chan error grpcErrChan chan error
grpcServer *grpc.Server grpcServer *grpc.Server
@ -38,8 +39,8 @@ type Server struct {
msFactory msgstream.Factory msFactory msgstream.Factory
masterService *msc.GrpcClient masterService types.MasterService
dataService *dsc.Client dataService types.DataService
closer io.Closer closer io.Closer
} }
@ -53,7 +54,7 @@ func New(ctx context.Context, factory msgstream.Factory) (*Server, error) {
grpcErrChan: make(chan error), grpcErrChan: make(chan error),
} }
s.impl = dn.NewDataNode(s.ctx, s.msFactory) s.datanode = dn.NewDataNode(s.ctx, s.msFactory)
return s, nil return s, nil
} }
@ -89,12 +90,12 @@ func (s *Server) startGrpcLoop(grpcPort int) {
} }
func (s *Server) SetMasterServiceInterface(ctx context.Context, ms dn.MasterServiceInterface) error { func (s *Server) SetMasterServiceInterface(ms types.MasterService) error {
return s.impl.SetMasterServiceInterface(ctx, ms) return s.datanode.SetMasterServiceInterface(ms)
} }
func (s *Server) SetDataServiceInterface(ctx context.Context, ds dn.DataServiceInterface) error { func (s *Server) SetDataServiceInterface(ds types.DataService) error {
return s.impl.SetDataServiceInterface(ctx, ds) return s.datanode.SetDataServiceInterface(ds)
} }
func (s *Server) Run() error { func (s *Server) Run() error {
@ -120,7 +121,7 @@ func (s *Server) Stop() error {
s.grpcServer.GracefulStop() s.grpcServer.GracefulStop()
} }
err := s.impl.Stop() err := s.datanode.Stop()
if err != nil { if err != nil {
return err return err
} }
@ -182,7 +183,7 @@ func (s *Server) init() error {
panic(err) panic(err)
} }
if err := s.SetMasterServiceInterface(ctx, masterClient); err != nil { if err := s.SetMasterServiceInterface(masterClient); err != nil {
panic(err) panic(err)
} }
@ -200,7 +201,7 @@ func (s *Server) init() error {
if err != nil { if err != nil {
panic(err) panic(err)
} }
if err := s.SetDataServiceInterface(ctx, dataService); err != nil { if err := s.SetDataServiceInterface(dataService); err != nil {
panic(err) panic(err)
} }
@ -208,30 +209,30 @@ func (s *Server) init() error {
dn.Params.Port = Params.Port dn.Params.Port = Params.Port
dn.Params.IP = Params.IP dn.Params.IP = Params.IP
s.impl.NodeID = dn.Params.NodeID s.datanode.NodeID = dn.Params.NodeID
s.impl.UpdateStateCode(internalpb2.StateCode_INITIALIZING) s.datanode.UpdateStateCode(internalpb2.StateCode_INITIALIZING)
if err := s.impl.Init(); err != nil { if err := s.datanode.Init(); err != nil {
log.Warn("impl init error: ", zap.Error(err)) log.Warn("datanode init error: ", zap.Error(err))
return err return err
} }
return nil return nil
} }
func (s *Server) start() error { func (s *Server) start() error {
return s.impl.Start() return s.datanode.Start()
} }
func (s *Server) GetComponentStates(ctx context.Context, empty *commonpb.Empty) (*internalpb2.ComponentStates, error) { func (s *Server) GetComponentStates(ctx context.Context, empty *commonpb.Empty) (*internalpb2.ComponentStates, error) {
return s.impl.GetComponentStates(ctx) return s.datanode.GetComponentStates(ctx)
} }
func (s *Server) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelRequest) (*commonpb.Status, error) { func (s *Server) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelRequest) (*commonpb.Status, error) {
return s.impl.WatchDmChannels(ctx, in) return s.datanode.WatchDmChannels(ctx, in)
} }
func (s *Server) FlushSegments(ctx context.Context, in *datapb.FlushSegRequest) (*commonpb.Status, error) { func (s *Server) FlushSegments(ctx context.Context, in *datapb.FlushSegRequest) (*commonpb.Status, error) {
if s.impl.State.Load().(internalpb2.StateCode) != internalpb2.StateCode_HEALTHY { if s.datanode.State.Load().(internalpb2.StateCode) != internalpb2.StateCode_HEALTHY {
return &commonpb.Status{ return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR, ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: "DataNode isn't healthy.", Reason: "DataNode isn't healthy.",
@ -239,5 +240,5 @@ func (s *Server) FlushSegments(ctx context.Context, in *datapb.FlushSegRequest)
} }
return &commonpb.Status{ return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS, ErrorCode: commonpb.ErrorCode_SUCCESS,
}, s.impl.FlushSegments(ctx, in) }, s.datanode.FlushSegments(ctx, in)
} }

View File

@ -16,18 +16,19 @@ import (
"google.golang.org/grpc" "google.golang.org/grpc"
otgrpc "github.com/opentracing-contrib/go-grpc" otgrpc "github.com/opentracing-contrib/go-grpc"
msc "github.com/zilliztech/milvus-distributed/internal/distributed/masterservice/client"
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go"
"github.com/uber/jaeger-client-go/config" "github.com/uber/jaeger-client-go/config"
"github.com/zilliztech/milvus-distributed/internal/dataservice" "github.com/zilliztech/milvus-distributed/internal/dataservice"
msc "github.com/zilliztech/milvus-distributed/internal/distributed/masterservice/client"
"github.com/zilliztech/milvus-distributed/internal/log"
"github.com/zilliztech/milvus-distributed/internal/msgstream" "github.com/zilliztech/milvus-distributed/internal/msgstream"
"github.com/zilliztech/milvus-distributed/internal/types"
"github.com/zilliztech/milvus-distributed/internal/util/funcutil"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb" "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/datapb" "github.com/zilliztech/milvus-distributed/internal/proto/datapb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2" "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb" "github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/util/funcutil"
) )
type Server struct { type Server struct {
@ -37,9 +38,9 @@ type Server struct {
grpcErrChan chan error grpcErrChan chan error
wg sync.WaitGroup wg sync.WaitGroup
impl *dataservice.Server dataService *dataservice.Server
grpcServer *grpc.Server grpcServer *grpc.Server
masterClient *msc.GrpcClient masterService types.MasterService
closer io.Closer closer io.Closer
} }
@ -69,7 +70,7 @@ func NewServer(ctx context.Context, factory msgstream.Factory) (*Server, error)
opentracing.SetGlobalTracer(tracer) opentracing.SetGlobalTracer(tracer)
s.closer = closer s.closer = closer
s.impl, err = dataservice.CreateServer(s.ctx, factory) s.dataService, err = dataservice.CreateServer(s.ctx, factory)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -99,7 +100,7 @@ func (s *Server) init() error {
if err = client.Start(); err != nil { if err = client.Start(); err != nil {
panic(err) panic(err)
} }
s.impl.UpdateStateCode(internalpb2.StateCode_INITIALIZING) s.dataService.UpdateStateCode(internalpb2.StateCode_INITIALIZING)
ctx := context.Background() ctx := context.Background()
err = funcutil.WaitForComponentInitOrHealthy(ctx, client, "MasterService", 100, time.Millisecond*200) err = funcutil.WaitForComponentInitOrHealthy(ctx, client, "MasterService", 100, time.Millisecond*200)
@ -107,11 +108,11 @@ func (s *Server) init() error {
if err != nil { if err != nil {
panic(err) panic(err)
} }
s.impl.SetMasterClient(client) s.dataService.SetMasterClient(client)
dataservice.Params.Init() dataservice.Params.Init()
if err := s.impl.Init(); err != nil { if err := s.dataService.Init(); err != nil {
log.Error("impl init error", zap.Error(err)) log.Error("dataService init error", zap.Error(err))
return err return err
} }
return nil return nil
@ -146,7 +147,7 @@ func (s *Server) startGrpcLoop(grpcPort int) {
} }
func (s *Server) start() error { func (s *Server) start() error {
return s.impl.Start() return s.dataService.Start()
} }
func (s *Server) Stop() error { func (s *Server) Stop() error {
@ -160,7 +161,7 @@ func (s *Server) Stop() error {
s.grpcServer.GracefulStop() s.grpcServer.GracefulStop()
} }
err = s.impl.Stop() err = s.dataService.Stop()
if err != nil { if err != nil {
return err return err
} }
@ -184,61 +185,61 @@ func (s *Server) Run() error {
} }
func (s *Server) GetSegmentInfo(ctx context.Context, request *datapb.SegmentInfoRequest) (*datapb.SegmentInfoResponse, error) { func (s *Server) GetSegmentInfo(ctx context.Context, request *datapb.SegmentInfoRequest) (*datapb.SegmentInfoResponse, error) {
return s.impl.GetSegmentInfo(ctx, request) return s.dataService.GetSegmentInfo(ctx, request)
} }
func (s *Server) RegisterNode(ctx context.Context, request *datapb.RegisterNodeRequest) (*datapb.RegisterNodeResponse, error) { func (s *Server) RegisterNode(ctx context.Context, request *datapb.RegisterNodeRequest) (*datapb.RegisterNodeResponse, error) {
return s.impl.RegisterNode(ctx, request) return s.dataService.RegisterNode(ctx, request)
} }
func (s *Server) Flush(ctx context.Context, request *datapb.FlushRequest) (*commonpb.Status, error) { func (s *Server) Flush(ctx context.Context, request *datapb.FlushRequest) (*commonpb.Status, error) {
return s.impl.Flush(ctx, request) return s.dataService.Flush(ctx, request)
} }
func (s *Server) AssignSegmentID(ctx context.Context, request *datapb.AssignSegIDRequest) (*datapb.AssignSegIDResponse, error) { func (s *Server) AssignSegmentID(ctx context.Context, request *datapb.AssignSegIDRequest) (*datapb.AssignSegIDResponse, error) {
return s.impl.AssignSegmentID(ctx, request) return s.dataService.AssignSegmentID(ctx, request)
} }
func (s *Server) ShowSegments(ctx context.Context, request *datapb.ShowSegmentRequest) (*datapb.ShowSegmentResponse, error) { func (s *Server) ShowSegments(ctx context.Context, request *datapb.ShowSegmentRequest) (*datapb.ShowSegmentResponse, error) {
return s.impl.ShowSegments(ctx, request) return s.dataService.ShowSegments(ctx, request)
} }
func (s *Server) GetSegmentStates(ctx context.Context, request *datapb.SegmentStatesRequest) (*datapb.SegmentStatesResponse, error) { func (s *Server) GetSegmentStates(ctx context.Context, request *datapb.SegmentStatesRequest) (*datapb.SegmentStatesResponse, error) {
return s.impl.GetSegmentStates(ctx, request) return s.dataService.GetSegmentStates(ctx, request)
} }
func (s *Server) GetInsertBinlogPaths(ctx context.Context, request *datapb.InsertBinlogPathRequest) (*datapb.InsertBinlogPathsResponse, error) { func (s *Server) GetInsertBinlogPaths(ctx context.Context, request *datapb.InsertBinlogPathRequest) (*datapb.InsertBinlogPathsResponse, error) {
return s.impl.GetInsertBinlogPaths(ctx, request) return s.dataService.GetInsertBinlogPaths(ctx, request)
} }
func (s *Server) GetInsertChannels(ctx context.Context, request *datapb.InsertChannelRequest) (*internalpb2.StringList, error) { func (s *Server) GetInsertChannels(ctx context.Context, request *datapb.InsertChannelRequest) (*internalpb2.StringList, error) {
return s.impl.GetInsertChannels(ctx, request) return s.dataService.GetInsertChannels(ctx, request)
} }
func (s *Server) GetCollectionStatistics(ctx context.Context, request *datapb.CollectionStatsRequest) (*datapb.CollectionStatsResponse, error) { func (s *Server) GetCollectionStatistics(ctx context.Context, request *datapb.CollectionStatsRequest) (*datapb.CollectionStatsResponse, error) {
return s.impl.GetCollectionStatistics(ctx, request) return s.dataService.GetCollectionStatistics(ctx, request)
} }
func (s *Server) GetPartitionStatistics(ctx context.Context, request *datapb.PartitionStatsRequest) (*datapb.PartitionStatsResponse, error) { func (s *Server) GetPartitionStatistics(ctx context.Context, request *datapb.PartitionStatsRequest) (*datapb.PartitionStatsResponse, error) {
return s.impl.GetPartitionStatistics(ctx, request) return s.dataService.GetPartitionStatistics(ctx, request)
} }
func (s *Server) GetComponentStates(ctx context.Context, empty *commonpb.Empty) (*internalpb2.ComponentStates, error) { func (s *Server) GetComponentStates(ctx context.Context, empty *commonpb.Empty) (*internalpb2.ComponentStates, error) {
return s.impl.GetComponentStates(ctx) return s.dataService.GetComponentStates(ctx)
} }
func (s *Server) GetTimeTickChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) { func (s *Server) GetTimeTickChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.impl.GetTimeTickChannel(ctx) return s.dataService.GetTimeTickChannel(ctx)
} }
func (s *Server) GetStatisticsChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) { func (s *Server) GetStatisticsChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.impl.GetStatisticsChannel(ctx) return s.dataService.GetStatisticsChannel(ctx)
} }
func (s *Server) GetSegmentInfoChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) { func (s *Server) GetSegmentInfoChannel(ctx context.Context, empty *commonpb.Empty) (*milvuspb.StringResponse, error) {
return s.impl.GetSegmentInfoChannel(ctx) return s.dataService.GetSegmentInfoChannel(ctx)
} }
func (s *Server) GetCount(ctx context.Context, request *datapb.CollectionCountRequest) (*datapb.CollectionCountResponse, error) { func (s *Server) GetCount(ctx context.Context, request *datapb.CollectionCountRequest) (*datapb.CollectionCountResponse, error) {
return s.impl.GetCount(ctx, request) return s.dataService.GetCount(ctx, request)
} }

View File

@ -1293,10 +1293,17 @@ func (c *Core) DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRequ
idxNames = append(idxNames, i.IndexName) idxNames = append(idxNames, i.IndexName)
} }
log.Debug("DescribeIndex Success", zap.String("collection name", in.CollectionName), zap.String("field name", in.FieldName), zap.Strings("index names", idxNames)) log.Debug("DescribeIndex Success", zap.String("collection name", in.CollectionName), zap.String("field name", in.FieldName), zap.Strings("index names", idxNames))
if len(t.Rsp.IndexDescriptions) == 0 {
t.Rsp.Status = &commonpb.Status{
ErrorCode: commonpb.ErrorCode_INDEX_NOT_EXIST,
Reason: "index not exist",
}
} else {
t.Rsp.Status = &commonpb.Status{ t.Rsp.Status = &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS, ErrorCode: commonpb.ErrorCode_SUCCESS,
Reason: "", Reason: "",
} }
}
return t.Rsp, nil return t.Rsp, nil
} }

View File

@ -668,6 +668,25 @@ func TestMasterService(t *testing.T) {
assert.Equal(t, rsp.IndexDescriptions[0].IndexName, Params.DefaultIndexName) assert.Equal(t, rsp.IndexDescriptions[0].IndexName, Params.DefaultIndexName)
}) })
t.Run("describe index not exist", func(t *testing.T) {
req := &milvuspb.DescribeIndexRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_kDescribeIndex,
MsgID: 200,
Timestamp: 200,
SourceID: 200,
},
DbName: "",
CollectionName: "testColl",
FieldName: "vector",
IndexName: "not-exist-index",
}
rsp, err := core.DescribeIndex(ctx, req)
assert.Nil(t, err)
assert.Equal(t, rsp.Status.ErrorCode, commonpb.ErrorCode_INDEX_NOT_EXIST)
assert.Equal(t, len(rsp.IndexDescriptions), 0)
})
t.Run("flush segment", func(t *testing.T) { t.Run("flush segment", func(t *testing.T) {
coll, err := core.MetaTable.GetCollectionByName("testColl") coll, err := core.MetaTable.GetCollectionByName("testColl")
assert.Nil(t, err) assert.Nil(t, err)

View File

@ -28,6 +28,7 @@ enum ErrorCode {
ILLEGAL_NLIST = 22; ILLEGAL_NLIST = 22;
ILLEGAL_METRIC_TYPE = 23; ILLEGAL_METRIC_TYPE = 23;
OUT_OF_MEMORY = 24; OUT_OF_MEMORY = 24;
INDEX_NOT_EXIST = 25;
// internal error code. // internal error code.
DD_REQUEST_RACE = 1000; DD_REQUEST_RACE = 1000;

View File

@ -47,6 +47,7 @@ const (
ErrorCode_ILLEGAL_NLIST ErrorCode = 22 ErrorCode_ILLEGAL_NLIST ErrorCode = 22
ErrorCode_ILLEGAL_METRIC_TYPE ErrorCode = 23 ErrorCode_ILLEGAL_METRIC_TYPE ErrorCode = 23
ErrorCode_OUT_OF_MEMORY ErrorCode = 24 ErrorCode_OUT_OF_MEMORY ErrorCode = 24
ErrorCode_INDEX_NOT_EXIST ErrorCode = 25
// internal error code. // internal error code.
ErrorCode_DD_REQUEST_RACE ErrorCode = 1000 ErrorCode_DD_REQUEST_RACE ErrorCode = 1000
) )
@ -76,6 +77,7 @@ var ErrorCode_name = map[int32]string{
22: "ILLEGAL_NLIST", 22: "ILLEGAL_NLIST",
23: "ILLEGAL_METRIC_TYPE", 23: "ILLEGAL_METRIC_TYPE",
24: "OUT_OF_MEMORY", 24: "OUT_OF_MEMORY",
25: "INDEX_NOT_EXIST",
1000: "DD_REQUEST_RACE", 1000: "DD_REQUEST_RACE",
} }
@ -104,6 +106,7 @@ var ErrorCode_value = map[string]int32{
"ILLEGAL_NLIST": 22, "ILLEGAL_NLIST": 22,
"ILLEGAL_METRIC_TYPE": 23, "ILLEGAL_METRIC_TYPE": 23,
"OUT_OF_MEMORY": 24, "OUT_OF_MEMORY": 24,
"INDEX_NOT_EXIST": 25,
"DD_REQUEST_RACE": 1000, "DD_REQUEST_RACE": 1000,
} }
@ -658,82 +661,82 @@ func init() {
func init() { proto.RegisterFile("common.proto", fileDescriptor_555bd8c177793206) } func init() { proto.RegisterFile("common.proto", fileDescriptor_555bd8c177793206) }
var fileDescriptor_555bd8c177793206 = []byte{ var fileDescriptor_555bd8c177793206 = []byte{
// 1222 bytes of a gzipped FileDescriptorProto // 1231 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff,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, 0xf8, 0xe5, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x3d, 0x4b, 0x66, 0x41, 0x74, 0xa6, 0x5e, 0xa1, 0xb3, 0xf4, 0x15, 0x9a, 0x0f, 0x06, 0x9b, 0x2a, 0x7e,
0x8c, 0x4b, 0x53, 0x08, 0x00, 0x00, 0xe5, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x85, 0xb7, 0x70, 0x68, 0x08, 0x00, 0x00,
} }

View File

@ -20,7 +20,7 @@ go test -race -cover "${MILVUS_DIR}/kv/..." "${MILVUS_DIR}/tso/..." "${MILVUS_DI
go test -race -cover "${MILVUS_DIR}/datanode/..." -failfast go test -race -cover "${MILVUS_DIR}/datanode/..." -failfast
go test -race -cover "${MILVUS_DIR}/indexnode/..." -failfast go test -race -cover "${MILVUS_DIR}/indexnode/..." -failfast
#go test -race -cover "${MILVUS_DIR}/msgstream/..." "${MILVUS_DIR}/querynode/..." "${MILVUS_DIR}/storage" "${MILVUS_DIR}/util/..." -failfast #go test -race -cover "${MILVUS_DIR}/msgstream/..." "${MILVUS_DIR}/querynode/..." "${MILVUS_DIR}/storage" "${MILVUS_DIR}/util/..." -failfast
go test -race -cover "${MILVUS_DIR}/querynode/..." -failfast go test -cover "${MILVUS_DIR}/querynode/..." -failfast
#go test -race -cover "${MILVUS_DIR}/msgstream/..." "${MILVUS_DIR}/storage" "${MILVUS_DIR}/util/..." -failfast #go test -race -cover "${MILVUS_DIR}/msgstream/..." "${MILVUS_DIR}/storage" "${MILVUS_DIR}/util/..." -failfast
#go test -race -cover "${MILVUS_DIR}/msgstream/..." "${MILVUS_DIR}/util/..." -failfast #go test -race -cover "${MILVUS_DIR}/msgstream/..." "${MILVUS_DIR}/util/..." -failfast
go test -race -cover "${MILVUS_DIR}/msgstream/..." -failfast go test -race -cover "${MILVUS_DIR}/msgstream/..." -failfast