2021-04-19 15:15:33 +08:00
|
|
|
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
|
|
|
|
// with the License. You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
|
|
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
|
|
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
|
|
|
2021-03-05 15:21:33 +08:00
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2021-04-22 14:45:57 +08:00
|
|
|
"github.com/milvus-io/milvus/internal/proto/commonpb"
|
|
|
|
"github.com/milvus-io/milvus/internal/proto/datapb"
|
|
|
|
"github.com/milvus-io/milvus/internal/proto/indexpb"
|
|
|
|
"github.com/milvus-io/milvus/internal/proto/internalpb"
|
|
|
|
"github.com/milvus-io/milvus/internal/proto/milvuspb"
|
|
|
|
"github.com/milvus-io/milvus/internal/proto/proxypb"
|
|
|
|
"github.com/milvus-io/milvus/internal/proto/querypb"
|
2021-06-22 16:14:09 +08:00
|
|
|
"github.com/milvus-io/milvus/internal/proto/rootcoordpb"
|
2021-05-26 20:14:30 +08:00
|
|
|
"github.com/milvus-io/milvus/internal/util/sessionutil"
|
2021-03-05 15:21:33 +08:00
|
|
|
)
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// TimeTickProvider is the interface all services implement
|
2021-03-05 15:21:33 +08:00
|
|
|
type TimeTickProvider interface {
|
|
|
|
GetTimeTickChannel(ctx context.Context) (*milvuspb.StringResponse, error)
|
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// Component is the interface all services implement
|
2021-03-05 15:21:33 +08:00
|
|
|
type Component interface {
|
|
|
|
Init() error
|
|
|
|
Start() error
|
|
|
|
Stop() error
|
2021-03-12 14:22:09 +08:00
|
|
|
GetComponentStates(ctx context.Context) (*internalpb.ComponentStates, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error)
|
2021-05-25 15:06:05 +08:00
|
|
|
Register() error
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// DataNode is the interface `datanode` package implements
|
2021-03-05 18:14:59 +08:00
|
|
|
type DataNode interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
WatchDmChannels(ctx context.Context, req *datapb.WatchDmChannelsRequest) (*commonpb.Status, error)
|
|
|
|
FlushSegments(ctx context.Context, req *datapb.FlushSegmentsRequest) (*commonpb.Status, error)
|
2021-09-01 10:13:15 +08:00
|
|
|
|
|
|
|
GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// DataCoord is the interface `datacoord` package implements
|
2021-06-21 18:22:13 +08:00
|
|
|
type DataCoord interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
|
|
|
TimeTickProvider
|
|
|
|
|
2021-09-27 10:23:57 +08:00
|
|
|
// Flush notifies DataCoord to flush all current growing segments of specified Collection
|
2021-09-28 14:14:03 +08:00
|
|
|
// ctx is the context to control request deadline and cancellation
|
2021-09-27 10:23:57 +08:00
|
|
|
// req contains the request params, which are database name(not used for now) and collection id
|
|
|
|
//
|
|
|
|
// response struct `FlushResponse` contains related db & collection meta
|
|
|
|
// and the affected segment ids
|
|
|
|
// error is returned only when some communication issue occurs
|
|
|
|
// if some error occurs in the process of `Flush`, it will be recorded and returned in `Status` field of response
|
|
|
|
//
|
|
|
|
// `Flush` returns when all growing segments of specified collection is "sealed"
|
|
|
|
// the flush procedure will wait corresponding data node(s) proceeds to the safe timestamp
|
|
|
|
// and the `Flush` operation will be truly invoked
|
|
|
|
// If the Datacoord or Datanode crashes in the flush procedure, recovery process will replay the ts check until all requirement is met
|
|
|
|
//
|
|
|
|
// Flushed segments can be check via `GetFlushedSegments` API
|
2021-06-23 16:56:11 +08:00
|
|
|
Flush(ctx context.Context, req *datapb.FlushRequest) (*datapb.FlushResponse, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
AssignSegmentID(ctx context.Context, req *datapb.AssignSegmentIDRequest) (*datapb.AssignSegmentIDResponse, error)
|
|
|
|
GetSegmentStates(ctx context.Context, req *datapb.GetSegmentStatesRequest) (*datapb.GetSegmentStatesResponse, error)
|
|
|
|
GetInsertBinlogPaths(ctx context.Context, req *datapb.GetInsertBinlogPathsRequest) (*datapb.GetInsertBinlogPathsResponse, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
GetSegmentInfoChannel(ctx context.Context) (*milvuspb.StringResponse, error)
|
2021-03-12 14:22:09 +08:00
|
|
|
GetCollectionStatistics(ctx context.Context, req *datapb.GetCollectionStatisticsRequest) (*datapb.GetCollectionStatisticsResponse, error)
|
|
|
|
GetPartitionStatistics(ctx context.Context, req *datapb.GetPartitionStatisticsRequest) (*datapb.GetPartitionStatisticsResponse, error)
|
|
|
|
GetSegmentInfo(ctx context.Context, req *datapb.GetSegmentInfoRequest) (*datapb.GetSegmentInfoResponse, error)
|
2021-06-07 14:16:36 +08:00
|
|
|
GetRecoveryInfo(ctx context.Context, req *datapb.GetRecoveryInfoRequest) (*datapb.GetRecoveryInfoResponse, error)
|
2021-05-27 18:45:24 +08:00
|
|
|
SaveBinlogPaths(ctx context.Context, req *datapb.SaveBinlogPathsRequest) (*commonpb.Status, error)
|
2021-07-02 11:16:20 +08:00
|
|
|
GetFlushedSegments(ctx context.Context, req *datapb.GetFlushedSegmentsRequest) (*datapb.GetFlushedSegmentsResponse, error)
|
2021-09-01 17:35:00 +08:00
|
|
|
|
|
|
|
GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// IndexNode is the interface `indexnode` package implements
|
2021-03-05 18:14:59 +08:00
|
|
|
type IndexNode interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
|
|
|
TimeTickProvider
|
|
|
|
|
2021-09-27 22:48:03 +08:00
|
|
|
// CreateIndex receives request from IndexCoordinator to build an index.
|
|
|
|
// Index building is asynchronous, so when an index building request comes, IndexNode records the task and returns.
|
2021-05-27 22:24:29 +08:00
|
|
|
CreateIndex(ctx context.Context, req *indexpb.CreateIndexRequest) (*commonpb.Status, error)
|
2021-09-27 22:48:03 +08:00
|
|
|
// GetMetrics gets the metrics about IndexNode.
|
2021-08-19 10:28:10 +08:00
|
|
|
GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// IndexCoord is the interface `indexcoord` package implements
|
2021-06-21 17:28:03 +08:00
|
|
|
type IndexCoord interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
|
|
|
TimeTickProvider
|
|
|
|
|
2021-09-27 22:48:03 +08:00
|
|
|
// BuildIndex receives request from RootCoordinator to build an index.
|
|
|
|
// Index building is asynchronous, so when an index building request comes, an IndexBuildID is assigned to the task and
|
|
|
|
// the task is recorded in Meta. The background process assignTaskLoop will find this task and assign it to IndexNode for
|
|
|
|
// execution.
|
2021-03-05 15:21:33 +08:00
|
|
|
BuildIndex(ctx context.Context, req *indexpb.BuildIndexRequest) (*indexpb.BuildIndexResponse, error)
|
2021-09-27 22:48:03 +08:00
|
|
|
// DropIndex deletes indexes based on IndexID. One IndexID corresponds to the index of an entire column. A column is
|
|
|
|
// divided into many segments, and each segment corresponds to an IndexBuildID. IndexCoord uses IndexBuildID to record
|
|
|
|
// index tasks. Therefore, when DropIndex is called, delete all tasks corresponding to IndexBuildID corresponding to IndexID.
|
2021-03-05 15:21:33 +08:00
|
|
|
DropIndex(ctx context.Context, req *indexpb.DropIndexRequest) (*commonpb.Status, error)
|
2021-09-27 22:48:03 +08:00
|
|
|
// GetIndexStates gets the index states of the IndexBuildIDs in the request from RootCoordinator.
|
2021-03-12 14:22:09 +08:00
|
|
|
GetIndexStates(ctx context.Context, req *indexpb.GetIndexStatesRequest) (*indexpb.GetIndexStatesResponse, error)
|
2021-09-27 22:48:03 +08:00
|
|
|
// GetIndexFilePaths gets the index files of the IndexBuildIDs in the request from RootCoordinator.
|
2021-03-12 14:22:09 +08:00
|
|
|
GetIndexFilePaths(ctx context.Context, req *indexpb.GetIndexFilePathsRequest) (*indexpb.GetIndexFilePathsResponse, error)
|
2021-09-27 22:48:03 +08:00
|
|
|
// GetMetrics gets the metrics about IndexCoord.
|
2021-09-01 17:35:00 +08:00
|
|
|
GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// RootCoord is the interface `rootcoord` package implements
|
2021-06-21 17:28:03 +08:00
|
|
|
type RootCoord interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
2021-04-24 17:23:35 +08:00
|
|
|
TimeTickProvider
|
2021-03-05 15:21:33 +08:00
|
|
|
|
2021-09-28 14:14:03 +08:00
|
|
|
// CreateCollection notifies RootCoord to create a collection
|
|
|
|
//
|
|
|
|
// ctx is the context to control request deadline and cancellation
|
|
|
|
// req contains the request params, including database name(not used), collection name, collection schema and
|
|
|
|
// physical channel num for inserting data
|
|
|
|
//
|
|
|
|
// The `ErrorCode` of `Status` is `Success` if create collection successfully;
|
|
|
|
// otherwise, the `ErrorCode` of `Status` will be `Error`, and the `Reason` of `Status` will record the fail cause.
|
|
|
|
// error is always nil
|
2021-03-12 14:22:09 +08:00
|
|
|
CreateCollection(ctx context.Context, req *milvuspb.CreateCollectionRequest) (*commonpb.Status, error)
|
2021-09-28 14:14:03 +08:00
|
|
|
|
|
|
|
// DropCollection notifies RootCoord to drop a collection
|
|
|
|
//
|
|
|
|
// ctx is the context to control request deadline and cancellation
|
|
|
|
// req contains the request params, including database name(not used) and collection name
|
|
|
|
//
|
|
|
|
// The `ErrorCode` of `Status` is `Success` if drop collection successfully;
|
|
|
|
// otherwise, the `ErrorCode` of `Status` will be `Error`, and the `Reason` of `Status` will record the fail cause.
|
|
|
|
// error is always nil
|
2021-03-12 14:22:09 +08:00
|
|
|
DropCollection(ctx context.Context, req *milvuspb.DropCollectionRequest) (*commonpb.Status, error)
|
2021-09-28 14:14:03 +08:00
|
|
|
|
|
|
|
// HasCollection notifies RootCoord to check a collection's existence at specified timestamp
|
|
|
|
//
|
|
|
|
// ctx is the context to control request deadline and cancellation
|
|
|
|
// req contains the request params, including database name(not used), collection name and timestamp
|
|
|
|
//
|
|
|
|
// The `Status` in response struct `BoolResponse` indicates if this operation is processed successfully or fail cause;
|
|
|
|
// the `Value` in `BoolResponse` is `true` if the collection exists at the specified timestamp, `false` otherwise.
|
|
|
|
// Timestamp is ignored if set to 0.
|
|
|
|
// error is always nil
|
2021-03-12 14:22:09 +08:00
|
|
|
HasCollection(ctx context.Context, req *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error)
|
2021-09-28 14:14:03 +08:00
|
|
|
|
|
|
|
// DescribeCollection notifies RootCoord to get all information about this collection at specified timestamp
|
|
|
|
//
|
|
|
|
// ctx is the context to control request deadline and cancellation
|
|
|
|
// req contains the request params, including database name(not used), collection name or collection id, and timestamp
|
|
|
|
//
|
|
|
|
// The `Status` in response struct `DescribeCollectionResponse` indicates if this operation is processed successfully or fail cause;
|
|
|
|
// other fields in `DescribeCollectionResponse` are filled with this collection's schema, collection id,
|
|
|
|
// physical channel names, virtual channel names, created time, alias names, and so on.
|
|
|
|
//
|
|
|
|
// If timestamp is set a non-zero value and collection does not exist at this timestamp,
|
|
|
|
// the `ErrorCode` of `Status` in `DescribeCollectionResponse` will be set to `Error`.
|
|
|
|
// Timestamp is ignored if set to 0.
|
|
|
|
// error is always nil
|
2021-03-12 14:22:09 +08:00
|
|
|
DescribeCollection(ctx context.Context, req *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)
|
2021-09-28 14:14:03 +08:00
|
|
|
|
|
|
|
// ShowCollections notifies RootCoord to list all collection names in database at specified timestamp
|
|
|
|
//
|
|
|
|
// ctx is the context to control request deadline and cancellation
|
|
|
|
// req contains the request params, including database name(not used), collection name and timestamp
|
|
|
|
//
|
|
|
|
// The `Status` in response struct `ShowCollectionsResponse` indicates if this operation is processed successfully or fail cause;
|
|
|
|
// other fields in `ShowCollectionsResponse` are filled with each collections' names, collection ids,
|
|
|
|
// created times, created UTC times, and so on.
|
|
|
|
// error is always nil
|
2021-03-12 14:22:09 +08:00
|
|
|
ShowCollections(ctx context.Context, req *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error)
|
|
|
|
CreatePartition(ctx context.Context, req *milvuspb.CreatePartitionRequest) (*commonpb.Status, error)
|
|
|
|
DropPartition(ctx context.Context, req *milvuspb.DropPartitionRequest) (*commonpb.Status, error)
|
|
|
|
HasPartition(ctx context.Context, req *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error)
|
|
|
|
ShowPartitions(ctx context.Context, req *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
|
|
|
|
//index builder service
|
2021-03-12 14:22:09 +08:00
|
|
|
CreateIndex(ctx context.Context, req *milvuspb.CreateIndexRequest) (*commonpb.Status, error)
|
|
|
|
DescribeIndex(ctx context.Context, req *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error)
|
|
|
|
DropIndex(ctx context.Context, req *milvuspb.DropIndexRequest) (*commonpb.Status, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
|
2021-09-18 11:13:51 +08:00
|
|
|
// collection alias
|
|
|
|
CreateAlias(ctx context.Context, req *milvuspb.CreateAliasRequest) (*commonpb.Status, error)
|
|
|
|
DropAlias(ctx context.Context, req *milvuspb.DropAliasRequest) (*commonpb.Status, error)
|
|
|
|
AlterAlias(ctx context.Context, req *milvuspb.AlterAliasRequest) (*commonpb.Status, error)
|
|
|
|
|
2021-03-05 15:21:33 +08:00
|
|
|
//global timestamp allocator
|
2021-06-22 16:14:09 +08:00
|
|
|
AllocTimestamp(ctx context.Context, req *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error)
|
|
|
|
AllocID(ctx context.Context, req *rootcoordpb.AllocIDRequest) (*rootcoordpb.AllocIDResponse, error)
|
2021-05-21 16:08:12 +08:00
|
|
|
UpdateChannelTimeTick(ctx context.Context, req *internalpb.ChannelTimeTickMsg) (*commonpb.Status, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
//segment
|
|
|
|
DescribeSegment(ctx context.Context, req *milvuspb.DescribeSegmentRequest) (*milvuspb.DescribeSegmentResponse, error)
|
|
|
|
ShowSegments(ctx context.Context, req *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error)
|
2021-06-17 17:45:56 +08:00
|
|
|
ReleaseDQLMessageStream(ctx context.Context, in *proxypb.ReleaseDQLMessageStreamRequest) (*commonpb.Status, error)
|
2021-07-02 11:16:20 +08:00
|
|
|
SegmentFlushCompleted(ctx context.Context, in *datapb.SegmentFlushCompletedMsg) (*commonpb.Status, error)
|
2021-09-01 17:35:00 +08:00
|
|
|
|
|
|
|
GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-06-22 19:08:03 +08:00
|
|
|
// RootCoordComponent is used by grpc server of RootCoord
|
2021-06-21 17:28:03 +08:00
|
|
|
type RootCoordComponent interface {
|
|
|
|
RootCoord
|
2021-04-24 17:23:35 +08:00
|
|
|
|
|
|
|
UpdateStateCode(internalpb.StateCode)
|
2021-06-21 18:22:13 +08:00
|
|
|
SetDataCoord(context.Context, DataCoord) error
|
2021-06-21 17:28:03 +08:00
|
|
|
SetIndexCoord(IndexCoord) error
|
2021-06-22 16:44:09 +08:00
|
|
|
SetQueryCoord(QueryCoord) error
|
2021-06-22 19:08:03 +08:00
|
|
|
SetNewProxyClient(func(sess *sessionutil.Session) (Proxy, error))
|
2021-08-31 11:45:59 +08:00
|
|
|
|
|
|
|
GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
|
2021-04-24 17:23:35 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// Proxy is the interface `proxy` package implements
|
2021-06-22 19:08:03 +08:00
|
|
|
type Proxy interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
|
|
|
|
2021-09-27 18:23:59 +08:00
|
|
|
// InvalidateCollectionMetaCache notifies Proxy to clear all the meta cache of specific collection.
|
|
|
|
//
|
|
|
|
// InvalidateCollectionMetaCache should be called when there are any meta changes in specific collection.
|
|
|
|
// Such as `DropCollection`, `CreatePartition`, `DropPartition`, etc.
|
|
|
|
//
|
|
|
|
// ctx is the request to control request deadline and cancellation.
|
|
|
|
// request contains the request params, which are database name(not used now) and collection name.
|
|
|
|
//
|
|
|
|
// InvalidateCollectionMetaCache should always succeed even though the specific collection doesn't exist in Proxy.
|
|
|
|
// So the code of response `Status` should be always `Success`.
|
|
|
|
//
|
|
|
|
// error is returned only when some communication issue occurs.
|
2021-03-05 15:21:33 +08:00
|
|
|
InvalidateCollectionMetaCache(ctx context.Context, request *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error)
|
2021-09-27 18:23:59 +08:00
|
|
|
|
|
|
|
// ReleaseDQLMessageStream notifies Proxy to release and close the search message stream of specific collection.
|
|
|
|
//
|
|
|
|
// ReleaseDQLMessageStream should be called when the specific collection was released.
|
|
|
|
//
|
|
|
|
// ctx is the request to control request deadline and cancellation.
|
|
|
|
// request contains the request params, which are database id(not used now) and collection id.
|
|
|
|
//
|
|
|
|
// ReleaseDQLMessageStream should always succeed even though the specific collection doesn't exist in Proxy.
|
|
|
|
// So the code of response `Status` should be always `Success`.
|
|
|
|
//
|
|
|
|
// error is returned only when some communication issue occurs.
|
2021-06-17 17:45:56 +08:00
|
|
|
ReleaseDQLMessageStream(ctx context.Context, in *proxypb.ReleaseDQLMessageStreamRequest) (*commonpb.Status, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// QueryNode is the interface `querynode` package implements
|
2021-03-05 18:14:59 +08:00
|
|
|
type QueryNode interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
|
|
|
TimeTickProvider
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
AddQueryChannel(ctx context.Context, req *querypb.AddQueryChannelRequest) (*commonpb.Status, error)
|
|
|
|
RemoveQueryChannel(ctx context.Context, req *querypb.RemoveQueryChannelRequest) (*commonpb.Status, error)
|
|
|
|
WatchDmChannels(ctx context.Context, req *querypb.WatchDmChannelsRequest) (*commonpb.Status, error)
|
|
|
|
LoadSegments(ctx context.Context, req *querypb.LoadSegmentsRequest) (*commonpb.Status, error)
|
|
|
|
ReleaseCollection(ctx context.Context, req *querypb.ReleaseCollectionRequest) (*commonpb.Status, error)
|
|
|
|
ReleasePartitions(ctx context.Context, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)
|
|
|
|
ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)
|
|
|
|
GetSegmentInfo(ctx context.Context, req *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error)
|
2021-08-17 10:06:11 +08:00
|
|
|
|
|
|
|
GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// QueryCoord is the interface `querycoord` package implements
|
2021-06-22 16:44:09 +08:00
|
|
|
type QueryCoord interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
|
|
|
TimeTickProvider
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
ShowCollections(ctx context.Context, req *querypb.ShowCollectionsRequest) (*querypb.ShowCollectionsResponse, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
LoadCollection(ctx context.Context, req *querypb.LoadCollectionRequest) (*commonpb.Status, error)
|
|
|
|
ReleaseCollection(ctx context.Context, req *querypb.ReleaseCollectionRequest) (*commonpb.Status, error)
|
2021-03-12 14:22:09 +08:00
|
|
|
ShowPartitions(ctx context.Context, req *querypb.ShowPartitionsRequest) (*querypb.ShowPartitionsResponse, error)
|
|
|
|
LoadPartitions(ctx context.Context, req *querypb.LoadPartitionsRequest) (*commonpb.Status, error)
|
|
|
|
ReleasePartitions(ctx context.Context, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)
|
2021-06-15 12:41:40 +08:00
|
|
|
CreateQueryChannel(ctx context.Context, req *querypb.CreateQueryChannelRequest) (*querypb.CreateQueryChannelResponse, error)
|
2021-03-12 14:22:09 +08:00
|
|
|
GetPartitionStates(ctx context.Context, req *querypb.GetPartitionStatesRequest) (*querypb.GetPartitionStatesResponse, error)
|
|
|
|
GetSegmentInfo(ctx context.Context, req *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error)
|
2021-08-17 10:06:11 +08:00
|
|
|
|
|
|
|
GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|