querynodev2

package
v0.0.0-...-34e0b2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 63 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// index type
	IndexFaissIDMap      = "FLAT"
	IndexFaissIVFFlat    = "IVF_FLAT"
	IndexFaissIVFPQ      = "IVF_PQ"
	IndexScaNN           = "SCANN"
	IndexFaissIVFSQ8     = "IVF_SQ8"
	IndexFaissBinIDMap   = "BIN_FLAT"
	IndexFaissBinIVFFlat = "BIN_IVF_FLAT"

	IndexHNSW = "HNSW"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalWorker

type LocalWorker struct {
	// contains filtered or unexported fields
}

func NewLocalWorker

func NewLocalWorker(node *QueryNode) *LocalWorker

func (*LocalWorker) Delete

func (w *LocalWorker) Delete(ctx context.Context, req *querypb.DeleteRequest) error

func (*LocalWorker) GetStatistics

func (*LocalWorker) IsHealthy

func (w *LocalWorker) IsHealthy() bool

func (*LocalWorker) LoadSegments

func (w *LocalWorker) LoadSegments(ctx context.Context, req *querypb.LoadSegmentsRequest) error

func (*LocalWorker) QuerySegments

func (*LocalWorker) QueryStreamSegments

func (w *LocalWorker) QueryStreamSegments(ctx context.Context, req *querypb.QueryRequest, srv streamrpc.QueryStreamServer) error

func (*LocalWorker) ReleaseSegments

func (w *LocalWorker) ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmentsRequest) error

func (*LocalWorker) SearchSegments

func (w *LocalWorker) SearchSegments(ctx context.Context, req *querypb.SearchRequest) (*internalpb.SearchResults, error)

func (*LocalWorker) Stop

func (w *LocalWorker) Stop()

type QueryNode

type QueryNode struct {
	// contains filtered or unexported fields
}

QueryNode communicates with outside services and union all services in querynode package.

QueryNode implements `types.Component`, `types.QueryNode` interfaces.

`rootCoord` is a grpc client of root coordinator.
`indexCoord` is a grpc client of index coordinator.
`stateCode` is current statement of this query node, indicating whether it's healthy.

func NewQueryNode

func NewQueryNode(ctx context.Context, factory dependency.Factory) *QueryNode

NewQueryNode will return a QueryNode with abnormal state.

func (*QueryNode) CloseSegcore

func (node *QueryNode) CloseSegcore()

func (*QueryNode) Delete

func (node *QueryNode) Delete(ctx context.Context, req *querypb.DeleteRequest) (*commonpb.Status, error)

Delete is used to forward delete message between delegator and workers.

func (*QueryNode) GetAddress

func (node *QueryNode) GetAddress() string

func (*QueryNode) GetComponentStates

func (node *QueryNode) GetComponentStates(ctx context.Context, req *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)

GetComponentStates returns information about whether the node is healthy

func (*QueryNode) GetMetrics

GetMetrics return system infos of the query node, such as total memory, memory usage, cpu usage ...

func (*QueryNode) GetNodeID

func (node *QueryNode) GetNodeID() int64

func (*QueryNode) GetSegmentInfo

GetSegmentInfo returns segment information of the collection on the queryNode, and the information includes memSize, numRow, indexName, indexID ...

func (*QueryNode) GetStatistics

GetStatistics returns loaded statistics of collection.

func (*QueryNode) GetStatisticsChannel

func (node *QueryNode) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)

GetStatisticsChannel returns the statistics channel Statistics channel contains statistics infos of query nodes, such as segment infos, memory infos

func (*QueryNode) GetTimeTickChannel

GetTimeTickChannel returns the time tick channel TimeTickChannel contains many time tick messages, which will be sent by query nodes

func (*QueryNode) Init

func (node *QueryNode) Init() error

Init function init historical and streaming module to manage segments

func (*QueryNode) InitSegcore

func (node *QueryNode) InitSegcore() error

InitSegcore set init params of segCore, such as chunckRows, SIMD type...

func (*QueryNode) LoadPartitions

func (node *QueryNode) LoadPartitions(ctx context.Context, req *querypb.LoadPartitionsRequest) (*commonpb.Status, error)

func (*QueryNode) LoadSegments

func (node *QueryNode) LoadSegments(ctx context.Context, req *querypb.LoadSegmentsRequest) (*commonpb.Status, error)

LoadSegments load historical data into query node, historical data can be vector data or index

func (*QueryNode) Query

Query performs replica query tasks.

func (*QueryNode) QuerySegments

func (node *QueryNode) QuerySegments(ctx context.Context, req *querypb.QueryRequest) (*internalpb.RetrieveResults, error)

only used for delegator query segments from worker

func (*QueryNode) QueryStream

func (*QueryNode) QueryStreamSegments

func (node *QueryNode) QueryStreamSegments(req *querypb.QueryRequest, srv querypb.QueryNode_QueryStreamSegmentsServer) error

func (*QueryNode) Register

func (node *QueryNode) Register() error

Register register query node at etcd

func (*QueryNode) ReleaseCollection

func (node *QueryNode) ReleaseCollection(ctx context.Context, in *querypb.ReleaseCollectionRequest) (*commonpb.Status, error)

ReleaseCollection clears all data related to this collection on the querynode

func (*QueryNode) ReleasePartitions

func (node *QueryNode) ReleasePartitions(ctx context.Context, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)

ReleasePartitions clears all data related to this partition on the querynode

func (*QueryNode) ReleaseSegments

func (node *QueryNode) ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)

ReleaseSegments remove the specified segments from query node according segmentIDs, partitionIDs, and collectionID

func (*QueryNode) Search

Search performs replica search tasks.

func (*QueryNode) SearchSegments

func (node *QueryNode) SearchSegments(ctx context.Context, req *querypb.SearchRequest) (*internalpb.SearchResults, error)

only used for shard delegator search segments from worker

func (*QueryNode) SetAddress

func (node *QueryNode) SetAddress(address string)

func (*QueryNode) SetEtcdClient

func (node *QueryNode) SetEtcdClient(client *clientv3.Client)

SetEtcdClient assigns parameter client to its member etcdCli

func (*QueryNode) ShowConfigurations

ShowConfigurations returns the configurations of queryNode matching req.Pattern

func (*QueryNode) Start

func (node *QueryNode) Start() error

Start mainly start QueryNode's query service.

func (*QueryNode) Stop

func (node *QueryNode) Stop() error

Stop mainly stop QueryNode's query service, historical loop and streaming loop.

func (*QueryNode) SyncDistribution

func (node *QueryNode) SyncDistribution(ctx context.Context, req *querypb.SyncDistributionRequest) (*commonpb.Status, error)

func (*QueryNode) SyncReplicaSegments

func (node *QueryNode) SyncReplicaSegments(ctx context.Context, req *querypb.SyncReplicaSegmentsRequest) (*commonpb.Status, error)

SyncReplicaSegments syncs replica node & segments states

func (*QueryNode) UnsubDmChannel

func (node *QueryNode) UnsubDmChannel(ctx context.Context, req *querypb.UnsubDmChannelRequest) (*commonpb.Status, error)

func (*QueryNode) UpdateStateCode

func (node *QueryNode) UpdateStateCode(code commonpb.StateCode)

UpdateStateCode updata the state of query node, which can be initializing, healthy, and abnormal

func (*QueryNode) WatchDmChannels

func (node *QueryNode) WatchDmChannels(ctx context.Context, req *querypb.WatchDmChannelsRequest) (status *commonpb.Status, e error)

WatchDmChannels create consumers on dmChannels to receive Incremental data,which is the important part of real-time query

Directories

Path Synopsis
delegator package contains the logic of shard delegator.
delegator package contains the logic of shard delegator.
delegator package contains the logic of shard delegator.
delegator package contains the logic of shard delegator.
pkoracle package contains pk - segment mapping logic.
pkoracle package contains pk - segment mapping logic.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL