datacoord

package
v0.10.3-0...-f06509b Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 81 Imported by: 0

README

Data Coordinator

Data cooridnator(datacoord for short) is the component to organize DataNodes and segments allocations.

Dependency

  • KV store: a kv store has all the meta info datacoord needs to operate. (etcd)
  • Message stream: a message stream to communicate statistics information with data nodes. (Pulsar)
  • Root Coordinator: timestamp, id and meta source.
  • Data Node(s): could be an instance or a cluster, actual worker group handles data modification operations.

Documentation

Overview

Package datacoord contains core functions in datacoord

Package datacoord contains core functions in datacoord

Index

Constants

View Source
const (
	NullNodeID = -1
)

Variables

View Source
var ChannelOpTypeNames = []string{"Add", "Delete"}

ChannelOpTypeNames implements zap log marshaller for ChannelOpSet.

View Source
var ImportTaskTypeName = map[TaskType]string{
	0: "PreImportTask",
	1: "ImportTask",
}
View Source
var Params = paramtable.Get()
View Source
var TaskStateNames = map[indexTaskState]string{
	0: "Init",
	1: "InProgress",
	2: "Done",
	3: "Retry",
}

Functions

func AllocatePolicyL1

func AllocatePolicyL1(segments []*SegmentInfo, count int64,
	maxCountPerL1Segment int64, level datapb.SegmentLevel,
) ([]*Allocation, []*Allocation)

alloca policy for L1 segment

func AssembleImportRequest

func AssembleImportRequest(task ImportTask, job ImportJob, meta *meta, alloc allocator) (*datapb.ImportRequest, error)

func AssemblePreImportRequest

func AssemblePreImportRequest(task ImportTask, job ImportJob) *datapb.PreImportRequest

func AssignSegments

func AssignSegments(task ImportTask, manager Manager) ([]int64, error)

func AvgAssignRegisterPolicy

func AvgAssignRegisterPolicy(store ROChannelStore, nodeID int64) (*ChannelOpSet, *ChannelOpSet)

AvgAssignRegisterPolicy assigns channels with average to new registered node Register will not directly delete the node-channel pair. Channel manager will handle channel release.

func CheckDiskQuota

func CheckDiskQuota(job ImportJob, meta *meta, imeta ImportMeta) (int64, error)

func DropImportTask

func DropImportTask(task ImportTask, cluster Cluster, tm ImportMeta) error

func EmptyRegister

func EmptyRegister(store ROChannelStore, nodeID int64) (*ChannelOpSet, *ChannelOpSet)

EmptyRegister does nothing

func GetBinlogCount

func GetBinlogCount(fieldBinlogs []*datapb.FieldBinlog) int

func GetBinlogSizeAsBytes

func GetBinlogSizeAsBytes(deltaBinlogs []*datapb.FieldBinlog) float64

func GetExpiredSizeAsBytes

func GetExpiredSizeAsBytes(expireTime Timestamp, fieldBinlogs []*datapb.FieldBinlog) float64

func GetIndexType

func GetIndexType(indexParams []*commonpb.KeyValuePair) string

func GetJobProgress

func GetJobProgress(jobID int64, imeta ImportMeta, meta *meta) (int64, internalpb.ImportJobState, int64, int64, string)

func GetTaskProgresses

func GetTaskProgresses(jobID int64, imeta ImportMeta, meta *meta) []*internalpb.ImportTaskProgress

func ListBinlogsAndGroupBySegment

func ListBinlogsAndGroupBySegment(ctx context.Context, cm storage.ChunkManager, importFile *internalpb.ImportFile) ([]*internalpb.ImportFile, error)

func RegroupImportFiles

func RegroupImportFiles(job ImportJob, files []*datapb.ImportFileStats) [][]*datapb.ImportFileStats

func UpdateCompactionSegmentSizeMetrics

func UpdateCompactionSegmentSizeMetrics(segments []*datapb.CompactionSegment)

func UpdateParams

func UpdateParams(index *model.Index, from []*commonpb.KeyValuePair, updates []*commonpb.KeyValuePair) ([]*commonpb.KeyValuePair, error)

func ValidateIndexParams

func ValidateIndexParams(index *model.Index, key, value string) error

func VerifyResponse

func VerifyResponse(response interface{}, err error) error

VerifyResponse verify grpc Response 1. check error is nil 2. check response.GetStatus() with status success

func WrapTaskLog

func WrapTaskLog(task ImportTask, fields ...zap.Field) []zap.Field

Types

type AllocatePolicy

type AllocatePolicy func(segments []*SegmentInfo, count int64,
	maxCountPerL1Segment int64, level datapb.SegmentLevel) ([]*Allocation, []*Allocation)

AllocatePolicy helper function definition to allocate Segment space

type Allocation

type Allocation struct {
	SegmentID  UniqueID
	NumOfRows  int64
	ExpireTime Timestamp
}

Allocation records the allocation info

func (*Allocation) String

func (alloc *Allocation) String() string

type BalanceChannelPolicy

type BalanceChannelPolicy func(store ROChannelStore, ts time.Time) *ChannelOpSet

type ChannelAssignPolicy

type ChannelAssignPolicy func(store ROChannelStore, channels []RWChannel) *ChannelOpSet

ChannelAssignPolicy assign channels to registered nodes.

type ChannelBGChecker

type ChannelBGChecker func(ctx context.Context)

ChannelBGChecker check nodes' channels and return the channels needed to be reallocated.

type ChannelManager

type ChannelManager interface {
	Startup(ctx context.Context, nodes []int64) error
	Close()

	AddNode(nodeID int64) error
	DeleteNode(nodeID int64) error
	Watch(ctx context.Context, ch RWChannel) error
	RemoveChannel(channelName string) error
	Release(nodeID UniqueID, channelName string) error

	Match(nodeID int64, channel string) bool
	FindWatcher(channel string) (int64, error)

	GetNodeChannelsByCollectionID(collectionID UniqueID) map[UniqueID][]string
	GetChannelsByCollectionID(collectionID UniqueID) []RWChannel
	GetCollectionIDByChannel(channel string) (bool, UniqueID)
	GetNodeIDByChannelName(channel string) (bool, UniqueID)
}

type ChannelManagerImpl

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

ChannelManagerImpl manages the allocation and the balance between channels and data nodes.

func NewChannelManager

func NewChannelManager(
	kv kv.WatchKV,
	h Handler,
	options ...ChannelManagerOpt,
) (*ChannelManagerImpl, error)

NewChannelManager creates and returns a new ChannelManager instance.

func (*ChannelManagerImpl) AddNode

func (c *ChannelManagerImpl) AddNode(nodeID int64) error

AddNode adds a new node to cluster and reassigns the node - channel mapping.

func (*ChannelManagerImpl) CleanupAndReassign

func (c *ChannelManagerImpl) CleanupAndReassign(nodeID UniqueID, channelName string) error

CleanupAndReassign tries to clean up datanode's subscription, and then reassigns the channel to another DataNode.

func (*ChannelManagerImpl) Close

func (c *ChannelManagerImpl) Close()

Close notifies the running checker.

func (*ChannelManagerImpl) DeleteNode

func (c *ChannelManagerImpl) DeleteNode(nodeID int64) error

DeleteNode deletes the node from the cluster. DeleteNode deletes the nodeID's watchInfos in Etcd and reassign the channels to other Nodes

func (*ChannelManagerImpl) FindWatcher

func (c *ChannelManagerImpl) FindWatcher(channel string) (int64, error)

FindWatcher finds the datanode watching the provided channel.

func (*ChannelManagerImpl) GetAssignedChannels

func (c *ChannelManagerImpl) GetAssignedChannels() []*NodeChannelInfo

GetAssignedChannels gets channels info of registered nodes.

func (*ChannelManagerImpl) GetBufferChannels

func (c *ChannelManagerImpl) GetBufferChannels() *NodeChannelInfo

GetBufferChannels gets buffer channels.

func (*ChannelManagerImpl) GetChannelNamesByCollectionID

func (c *ChannelManagerImpl) GetChannelNamesByCollectionID(collectionID UniqueID) []string

Get all channel names belong to the collection

func (*ChannelManagerImpl) GetChannelsByCollectionID

func (c *ChannelManagerImpl) GetChannelsByCollectionID(collectionID UniqueID) []RWChannel

Get all channels belong to the collection

func (*ChannelManagerImpl) GetCollectionIDByChannel

func (c *ChannelManagerImpl) GetCollectionIDByChannel(channel string) (bool, UniqueID)

func (*ChannelManagerImpl) GetNodeChannelsByCollectionID

func (c *ChannelManagerImpl) GetNodeChannelsByCollectionID(collectionID UniqueID) map[UniqueID][]string

GetNodeChannelsByCollectionID gets all node channels map of the collection

func (*ChannelManagerImpl) GetNodeIDByChannelName

func (c *ChannelManagerImpl) GetNodeIDByChannelName(channel string) (bool, UniqueID)

func (*ChannelManagerImpl) Match

func (c *ChannelManagerImpl) Match(nodeID int64, channel string) bool

Match checks and returns whether the node ID and channel match. use vchannel

func (*ChannelManagerImpl) Reassign

func (c *ChannelManagerImpl) Reassign(originNodeID UniqueID, channelName string) error

Reassign reassigns a channel to another DataNode.

func (*ChannelManagerImpl) Release

func (c *ChannelManagerImpl) Release(nodeID UniqueID, channelName string) error

Release writes ToRelease channel watch states for a channel

func (*ChannelManagerImpl) RemoveChannel

func (c *ChannelManagerImpl) RemoveChannel(channelName string) error

RemoveChannel removes the channel from channel manager.

func (*ChannelManagerImpl) Startup

func (c *ChannelManagerImpl) Startup(ctx context.Context, nodes []int64) error

Startup adjusts the channel store according to current cluster states.

func (*ChannelManagerImpl) Watch

func (c *ChannelManagerImpl) Watch(ctx context.Context, ch RWChannel) error

Watch tries to add the channel to cluster. Watch is a no op if the channel already exists.

type ChannelManagerOpt

type ChannelManagerOpt func(c *ChannelManagerImpl)

ChannelManagerOpt is to set optional parameters in channel manager.

type ChannelOp

type ChannelOp struct {
	Type     ChannelOpType
	NodeID   int64
	Channels []RWChannel
}

ChannelOp is an individual ADD or DELETE operation to the channel store.

func NewAddOp

func NewAddOp(id int64, channels ...RWChannel) *ChannelOp

func NewDeleteOp

func NewDeleteOp(id int64, channels ...RWChannel) *ChannelOp

func (*ChannelOp) Append

func (op *ChannelOp) Append(channels ...RWChannel)

func (*ChannelOp) BuildKV

func (op *ChannelOp) BuildKV() (map[string]string, []string, error)

func (*ChannelOp) GetChannelNames

func (op *ChannelOp) GetChannelNames() []string

func (*ChannelOp) MarshalLogObject

func (op *ChannelOp) MarshalLogObject(enc zapcore.ObjectEncoder) error

TODO: NIT: ObjectMarshaler -> ObjectMarshaller MarshalLogObject implements the interface ObjectMarshaler.

type ChannelOpSet

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

ChannelOpSet is a set of channel operations.

func AverageAssignPolicy

func AverageAssignPolicy(store ROChannelStore, channels []RWChannel) *ChannelOpSet

AverageAssignPolicy ensure that the number of channels per nodes is approximately the same

func AverageReassignPolicy

func AverageReassignPolicy(store ROChannelStore, reassigns []*NodeChannelInfo) *ChannelOpSet

AverageReassignPolicy is a reassigning policy that evenly balance channels among datanodes which is used by bgChecker

func AvgAssignUnregisteredChannels

func AvgAssignUnregisteredChannels(store ROChannelStore, nodeID int64) *ChannelOpSet

AvgAssignUnregisteredChannels evenly assign the unregistered channels

func AvgBalanceChannelPolicy

func AvgBalanceChannelPolicy(store ROChannelStore, ts time.Time) *ChannelOpSet

func BufferChannelAssignPolicy

func BufferChannelAssignPolicy(store ROChannelStore, nodeID int64) *ChannelOpSet

BufferChannelAssignPolicy assigns buffer channels to new registered node

func EmptyBalancePolicy

func EmptyBalancePolicy(store ROChannelStore, ts time.Time) *ChannelOpSet

EmptyBalancePolicy is a dummy balance policy

func EmptyDeregisterPolicy

func EmptyDeregisterPolicy(store ROChannelStore, nodeID int64) *ChannelOpSet

EmptyDeregisterPolicy do nothing

func EmptyReassignPolicy

func EmptyReassignPolicy(store ROChannelStore, reassigns []*NodeChannelInfo) *ChannelOpSet

EmptyReassignPolicy is a dummy reassign policy

func NewChannelOpSet

func NewChannelOpSet(ops ...*ChannelOp) *ChannelOpSet

func (*ChannelOpSet) Add

func (c *ChannelOpSet) Add(id int64, channels ...RWChannel)

Add a new Add channel op, for ToWatch and ToRelease

func (*ChannelOpSet) Collect

func (c *ChannelOpSet) Collect() []*ChannelOp

func (*ChannelOpSet) Delete

func (c *ChannelOpSet) Delete(id int64, channels ...RWChannel)

func (*ChannelOpSet) GetChannelNumber

func (c *ChannelOpSet) GetChannelNumber() int

func (*ChannelOpSet) Insert

func (c *ChannelOpSet) Insert(ops ...*ChannelOp)

func (*ChannelOpSet) Len

func (c *ChannelOpSet) Len() int

func (*ChannelOpSet) MarshalLogArray

func (c *ChannelOpSet) MarshalLogArray(enc zapcore.ArrayEncoder) error

TODO: NIT: ArrayMarshaler -> ArrayMarshaller MarshalLogArray implements the interface of ArrayMarshaler of zap.

func (*ChannelOpSet) SplitByChannel

func (c *ChannelOpSet) SplitByChannel() map[string]*ChannelOpSet

type ChannelOpType

type ChannelOpType int8
const (
	Add ChannelOpType = iota
	Delete
)

type ChannelPolicyFactory

type ChannelPolicyFactory interface {
	// NewRegisterPolicy creates a new register policy.
	NewRegisterPolicy() RegisterPolicy
	// NewDeregisterPolicy creates a new deregister policy.
	NewDeregisterPolicy() DeregisterPolicy
	// NewAssignPolicy creates a new channel assign policy.
	NewAssignPolicy() ChannelAssignPolicy
	// NewReassignPolicy creates a new channel reassign policy.
	NewReassignPolicy() ChannelReassignPolicy
	// NewBalancePolicy creates a new channel balance policy.
	NewBalancePolicy() BalanceChannelPolicy
}

ChannelPolicyFactory is the abstract factory that creates policies for channel manager.

type ChannelPolicyFactoryV1

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

ChannelPolicyFactoryV1 equal to policy batch

func NewChannelPolicyFactoryV1

func NewChannelPolicyFactoryV1(kv kv.TxnKV) *ChannelPolicyFactoryV1

NewChannelPolicyFactoryV1 helper function creates a Channel policy factory v1 from kv.

func (*ChannelPolicyFactoryV1) NewAssignPolicy

func (f *ChannelPolicyFactoryV1) NewAssignPolicy() ChannelAssignPolicy

NewAssignPolicy implementing ChannelPolicyFactory returns AverageAssignPolicy.

func (*ChannelPolicyFactoryV1) NewBalancePolicy

func (f *ChannelPolicyFactoryV1) NewBalancePolicy() BalanceChannelPolicy

func (*ChannelPolicyFactoryV1) NewDeregisterPolicy

func (f *ChannelPolicyFactoryV1) NewDeregisterPolicy() DeregisterPolicy

NewDeregisterPolicy implementing ChannelPolicyFactory returns AvgAssignUnregisteredChannels.

func (*ChannelPolicyFactoryV1) NewReassignPolicy

func (f *ChannelPolicyFactoryV1) NewReassignPolicy() ChannelReassignPolicy

NewReassignPolicy implementing ChannelPolicyFactory returns AverageReassignPolicy.

func (*ChannelPolicyFactoryV1) NewRegisterPolicy

func (f *ChannelPolicyFactoryV1) NewRegisterPolicy() RegisterPolicy

NewRegisterPolicy implementing ChannelPolicyFactory returns BufferChannelAssignPolicy.

type ChannelReassignPolicy

type ChannelReassignPolicy func(store ROChannelStore, reassigns []*NodeChannelInfo) *ChannelOpSet

ChannelReassignPolicy is a policy for reassigning channels

type ChannelStore

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

ChannelStore maintains a mapping between channels and data nodes.

func NewChannelStore

func NewChannelStore(kv kv.TxnKV) *ChannelStore

NewChannelStore creates and returns a new ChannelStore.

func (*ChannelStore) Add

func (c *ChannelStore) Add(nodeID int64)

Add creates a new node-channels mapping for the given node, and assigns no channels to it. Returns immediately if the node's already in the channel.

func (*ChannelStore) Delete

func (c *ChannelStore) Delete(nodeID int64) ([]RWChannel, error)

Delete removes the given node from the channel store and returns its channels.

func (*ChannelStore) GetBufferChannelInfo

func (c *ChannelStore) GetBufferChannelInfo() *NodeChannelInfo

GetBufferChannelInfo returns all unassigned channels.

func (*ChannelStore) GetChannels

func (c *ChannelStore) GetChannels() []*NodeChannelInfo

GetChannels returns information of all channels.

func (*ChannelStore) GetNode

func (c *ChannelStore) GetNode(nodeID int64) *NodeChannelInfo

GetNode returns the channel info of a given node.

func (*ChannelStore) GetNodeChannelCount

func (c *ChannelStore) GetNodeChannelCount(nodeID int64) int

func (*ChannelStore) GetNodes

func (c *ChannelStore) GetNodes() []int64

GetNodes returns a slice of all nodes ids in the current channel store.

func (*ChannelStore) GetNodesChannels

func (c *ChannelStore) GetNodesChannels() []*NodeChannelInfo

GetNodesChannels returns the channels assigned to real nodes.

func (*ChannelStore) Reload

func (c *ChannelStore) Reload() error

Reload restores the buffer channels and node-channels mapping from kv.

func (*ChannelStore) Update

func (c *ChannelStore) Update(opSet *ChannelOpSet) error

Update applies the channel operations in opSet.

type Cluster

type Cluster interface {
	Startup(ctx context.Context, nodes []*NodeInfo) error
	Register(node *NodeInfo) error
	UnRegister(node *NodeInfo) error
	Watch(ctx context.Context, ch string, collectionID UniqueID) error
	Flush(ctx context.Context, nodeID int64, channel string, segments []*datapb.SegmentInfo) error
	FlushChannels(ctx context.Context, nodeID int64, flushTs Timestamp, channels []string) error
	PreImport(nodeID int64, in *datapb.PreImportRequest) error
	ImportV2(nodeID int64, in *datapb.ImportRequest) error
	QueryPreImport(nodeID int64, in *datapb.QueryPreImportRequest) (*datapb.QueryPreImportResponse, error)
	QueryImport(nodeID int64, in *datapb.QueryImportRequest) (*datapb.QueryImportResponse, error)
	DropImport(nodeID int64, in *datapb.DropImportRequest) error
	GetSessions() []*Session
	Close()
}

Cluster provides interfaces to interact with datanode cluster

type ClusterImpl

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

func NewClusterImpl

func NewClusterImpl(sessionManager SessionManager, channelManager ChannelManager) *ClusterImpl

NewClusterImpl creates a new cluster

func (*ClusterImpl) Close

func (c *ClusterImpl) Close()

Close releases resources opened in Cluster

func (*ClusterImpl) DropImport

func (c *ClusterImpl) DropImport(nodeID int64, in *datapb.DropImportRequest) error

func (*ClusterImpl) Flush

func (c *ClusterImpl) Flush(ctx context.Context, nodeID int64, channel string, segments []*datapb.SegmentInfo) error

Flush sends async FlushSegments requests to dataNodes which also according to channels where segments are assigned to.

func (*ClusterImpl) FlushChannels

func (c *ClusterImpl) FlushChannels(ctx context.Context, nodeID int64, flushTs Timestamp, channels []string) error

func (*ClusterImpl) GetSessions

func (c *ClusterImpl) GetSessions() []*Session

GetSessions returns all sessions

func (*ClusterImpl) ImportV2

func (c *ClusterImpl) ImportV2(nodeID int64, in *datapb.ImportRequest) error

func (*ClusterImpl) PreImport

func (c *ClusterImpl) PreImport(nodeID int64, in *datapb.PreImportRequest) error

func (*ClusterImpl) QueryImport

func (c *ClusterImpl) QueryImport(nodeID int64, in *datapb.QueryImportRequest) (*datapb.QueryImportResponse, error)

func (*ClusterImpl) QueryPreImport

func (*ClusterImpl) Register

func (c *ClusterImpl) Register(node *NodeInfo) error

Register registers a new node in cluster

func (*ClusterImpl) Startup

func (c *ClusterImpl) Startup(ctx context.Context, nodes []*NodeInfo) error

Startup inits the cluster with the given data nodes.

func (*ClusterImpl) UnRegister

func (c *ClusterImpl) UnRegister(node *NodeInfo) error

UnRegister removes a node from cluster

func (*ClusterImpl) Watch

func (c *ClusterImpl) Watch(ctx context.Context, ch string, collectionID UniqueID) error

Watch tries to add a channel in datanode cluster

type CollectionNameInfo

type CollectionNameInfo struct {
	CollectionName string
	DBName         string
}

type CompactionGroupLabel

type CompactionGroupLabel struct {
	CollectionID UniqueID
	PartitionID  UniqueID
	Channel      string
}

func (*CompactionGroupLabel) Equal

func (label *CompactionGroupLabel) Equal(other *CompactionGroupLabel) bool

func (*CompactionGroupLabel) IsMinGroup

func (label *CompactionGroupLabel) IsMinGroup() bool

func (*CompactionGroupLabel) Key

func (label *CompactionGroupLabel) Key() string

func (*CompactionGroupLabel) String

func (label *CompactionGroupLabel) String() string

type CompactionMeta

type CompactionMeta interface {
	SelectSegments(selector SegmentInfoSelector) []*SegmentInfo
	GetHealthySegment(segID UniqueID) *SegmentInfo
	UpdateSegmentsInfo(operators ...UpdateOperator) error
	SetSegmentCompacting(segmentID int64, compacting bool)

	CompleteCompactionMutation(plan *datapb.CompactionPlan, result *datapb.CompactionPlanResult) ([]*SegmentInfo, *segMetricMutation, error)
}

type CompactionScheduler

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

func NewCompactionScheduler

func NewCompactionScheduler() *CompactionScheduler

func (*CompactionScheduler) Finish

func (s *CompactionScheduler) Finish(nodeID UniqueID, plan *datapb.CompactionPlan)

func (*CompactionScheduler) GetTaskCount

func (s *CompactionScheduler) GetTaskCount() int

func (*CompactionScheduler) LogStatus

func (s *CompactionScheduler) LogStatus()

func (*CompactionScheduler) Schedule

func (s *CompactionScheduler) Schedule() []*compactionTask

Schedule pick 1 or 0 tasks for 1 node

func (*CompactionScheduler) Submit

func (s *CompactionScheduler) Submit(tasks ...*compactionTask)

type CompactionTriggerManager

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

CompactionTriggerManager registers Triggers to TriggerType so that when the certain TriggerType happens, the corresponding triggers can trigger the correct compaction plans. Trigger types: 1. Change of Views

  • LevelZeroViewTrigger
  • SegmentSizeViewTrigger

2. SystemIDLE & schedulerIDLE 3. Manual Compaction

func NewCompactionTriggerManager

func NewCompactionTriggerManager(alloc allocator, handler compactionPlanContext) *CompactionTriggerManager

func (*CompactionTriggerManager) Notify

func (m *CompactionTriggerManager) Notify(taskID UniqueID, eventType CompactionTriggerType, views []CompactionView)

func (*CompactionTriggerManager) SubmitL0ViewToScheduler

func (m *CompactionTriggerManager) SubmitL0ViewToScheduler(taskID int64, outView CompactionView)

type CompactionTriggerType

type CompactionTriggerType int8
const (
	TriggerTypeLevelZeroViewChange CompactionTriggerType = iota + 1
	TriggerTypeLevelZeroViewIDLE
	TriggerTypeSegmentSizeViewChange
)

type CompactionView

type CompactionView interface {
	GetGroupLabel() *CompactionGroupLabel
	GetSegmentsView() []*SegmentView
	Append(segments ...*SegmentView)
	String() string
	Trigger() (CompactionView, string)
	ForceTrigger() (CompactionView, string)
}

type CompactionViewManager

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

func NewCompactionViewManager

func NewCompactionViewManager(meta *meta, trigger TriggerManager, allocator allocator) *CompactionViewManager

func (*CompactionViewManager) Check

Global check could take some time, we need to record the time.

func (*CompactionViewManager) Close

func (m *CompactionViewManager) Close()

func (*CompactionViewManager) RefreshLevelZeroViews

func (m *CompactionViewManager) RefreshLevelZeroViews(latestCollSegs map[int64][]*SegmentInfo) []CompactionView

func (*CompactionViewManager) Start

func (m *CompactionViewManager) Start()

type DeregisterPolicy

type DeregisterPolicy func(store ROChannelStore, nodeID int64) *ChannelOpSet

DeregisterPolicy determine the mapping after deregistering the nodeID

type FullViews

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

func (*FullViews) GetSegmentViewBy

func (v *FullViews) GetSegmentViewBy(collectionID UniqueID, selector SegmentViewSelector) []*SegmentView

type GcOption

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

GcOption garbage collection options

type Handler

type Handler interface {
	// GetQueryVChanPositions gets the information recovery needed of a channel for QueryCoord
	GetQueryVChanPositions(ch RWChannel, partitionIDs ...UniqueID) *datapb.VchannelInfo
	// GetDataVChanPositions gets the information recovery needed of a channel for DataNode
	GetDataVChanPositions(ch RWChannel, partitionID UniqueID) *datapb.VchannelInfo
	CheckShouldDropChannel(ch string) bool
	FinishDropChannel(ch string, collectionID int64) error
	GetCollection(ctx context.Context, collectionID UniqueID) (*collectionInfo, error)
}

Handler handles some channel method for ChannelManager

type ImportChecker

type ImportChecker interface {
	Start()
	Close()
}

func NewImportChecker

func NewImportChecker(meta *meta,
	broker broker.Broker,
	cluster Cluster,
	alloc allocator,
	sm Manager,
	imeta ImportMeta,
) ImportChecker

type ImportJob

type ImportJob interface {
	GetJobID() int64
	GetCollectionID() int64
	GetCollectionName() string
	GetPartitionIDs() []int64
	GetVchannels() []string
	GetSchema() *schemapb.CollectionSchema
	GetTimeoutTs() uint64
	GetCleanupTs() uint64
	GetState() internalpb.ImportJobState
	GetReason() string
	GetRequestedDiskSize() int64
	GetStartTime() string
	GetCompleteTime() string
	GetFiles() []*internalpb.ImportFile
	GetOptions() []*commonpb.KeyValuePair
	Clone() ImportJob
}

type ImportJobFilter

type ImportJobFilter func(job ImportJob) bool

func WithCollectionID

func WithCollectionID(collectionID int64) ImportJobFilter

type ImportMeta

type ImportMeta interface {
	AddJob(job ImportJob) error
	UpdateJob(jobID int64, actions ...UpdateJobAction) error
	GetJob(jobID int64) ImportJob
	GetJobBy(filters ...ImportJobFilter) []ImportJob
	RemoveJob(jobID int64) error

	AddTask(task ImportTask) error
	UpdateTask(taskID int64, actions ...UpdateAction) error
	GetTask(taskID int64) ImportTask
	GetTaskBy(filters ...ImportTaskFilter) []ImportTask
	RemoveTask(taskID int64) error
}

func NewImportMeta

func NewImportMeta(catalog metastore.DataCoordCatalog) (ImportMeta, error)

type ImportScheduler

type ImportScheduler interface {
	Start()
	Close()
}

func NewImportScheduler

func NewImportScheduler(meta *meta,
	cluster Cluster,
	alloc allocator,
	imeta ImportMeta,
	buildIndexCh chan UniqueID,
) ImportScheduler

type ImportTask

type ImportTask interface {
	GetJobID() int64
	GetTaskID() int64
	GetCollectionID() int64
	GetNodeID() int64
	GetType() TaskType
	GetState() datapb.ImportTaskStateV2
	GetReason() string
	GetFileStats() []*datapb.ImportFileStats
	Clone() ImportTask
}

func NewImportTasks

func NewImportTasks(fileGroups [][]*datapb.ImportFileStats,
	job ImportJob,
	manager Manager,
	alloc allocator,
) ([]ImportTask, error)

func NewPreImportTasks

func NewPreImportTasks(fileGroups [][]*internalpb.ImportFile,
	job ImportJob,
	alloc allocator,
) ([]ImportTask, error)

type ImportTaskFilter

type ImportTaskFilter func(task ImportTask) bool

func WithJob

func WithJob(jobID int64) ImportTaskFilter

func WithStates

func WithStates(states ...datapb.ImportTaskStateV2) ImportTaskFilter

func WithType

func WithType(taskType TaskType) ImportTaskFilter

type IndexEngineVersionManager

type IndexEngineVersionManager interface {
	Startup(sessions map[string]*sessionutil.Session)
	AddNode(session *sessionutil.Session)
	RemoveNode(session *sessionutil.Session)
	Update(session *sessionutil.Session)

	GetCurrentIndexEngineVersion() int32
	GetMinimalIndexEngineVersion() int32
}

type IndexNodeManager

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

IndexNodeManager is used to manage the client of IndexNode.

func NewNodeManager

func NewNodeManager(ctx context.Context, indexNodeCreator indexNodeCreatorFunc) *IndexNodeManager

NewNodeManager is used to create a new IndexNodeManager.

func (*IndexNodeManager) AddNode

func (nm *IndexNodeManager) AddNode(nodeID UniqueID, address string) error

AddNode adds the client of IndexNode.

func (*IndexNodeManager) ClientSupportDisk

func (nm *IndexNodeManager) ClientSupportDisk() bool

func (*IndexNodeManager) GetAllClients

func (nm *IndexNodeManager) GetAllClients() map[UniqueID]types.IndexNodeClient

func (*IndexNodeManager) GetClientByID

func (nm *IndexNodeManager) GetClientByID(nodeID UniqueID) (types.IndexNodeClient, bool)

func (*IndexNodeManager) PeekClient

PeekClient peeks the client with the least load.

func (*IndexNodeManager) RemoveNode

func (nm *IndexNodeManager) RemoveNode(nodeID UniqueID)

RemoveNode removes the unused client of IndexNode.

func (*IndexNodeManager) StoppingNode

func (nm *IndexNodeManager) StoppingNode(nodeID UniqueID)

type LevelZeroSegmentsView

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

The LevelZeroSegments keeps the min group

func (*LevelZeroSegmentsView) Append

func (v *LevelZeroSegmentsView) Append(segments ...*SegmentView)

func (*LevelZeroSegmentsView) Equal

func (v *LevelZeroSegmentsView) Equal(others []*SegmentView) bool

func (*LevelZeroSegmentsView) ForceTrigger

func (v *LevelZeroSegmentsView) ForceTrigger() (CompactionView, string)

ForceTrigger triggers all qualified LevelZeroSegments according to views

func (*LevelZeroSegmentsView) GetGroupLabel

func (v *LevelZeroSegmentsView) GetGroupLabel() *CompactionGroupLabel

func (*LevelZeroSegmentsView) GetSegmentsView

func (v *LevelZeroSegmentsView) GetSegmentsView() []*SegmentView

func (*LevelZeroSegmentsView) String

func (v *LevelZeroSegmentsView) String() string

func (*LevelZeroSegmentsView) Trigger

Trigger triggers all qualified LevelZeroSegments according to views

type Manager

type Manager interface {

	// AllocSegment allocates rows and record the allocation.
	AllocSegment(ctx context.Context, collectionID, partitionID UniqueID, channelName string, requestRows int64) ([]*Allocation, error)
	AllocImportSegment(ctx context.Context, taskID int64, collectionID UniqueID, partitionID UniqueID, channelName string) (*SegmentInfo, error)
	// DropSegment drops the segment from manager.
	DropSegment(ctx context.Context, segmentID UniqueID)
	// FlushImportSegments set importing segment state to Flushed.
	FlushImportSegments(ctx context.Context, collectionID UniqueID, segmentIDs []UniqueID) error
	// SealAllSegments seals all segments of collection with collectionID and return sealed segments.
	// If segIDs is not empty, also seals segments in segIDs.
	SealAllSegments(ctx context.Context, collectionID UniqueID, segIDs []UniqueID) ([]UniqueID, error)
	// GetFlushableSegments returns flushable segment ids
	GetFlushableSegments(ctx context.Context, channel string, ts Timestamp) ([]UniqueID, error)
	// ExpireAllocations notifies segment status to expire old allocations
	ExpireAllocations(channel string, ts Timestamp) error
	// DropSegmentsOfChannel drops all segments in a channel
	DropSegmentsOfChannel(ctx context.Context, channel string)
}

Manager manages segment related operations.

type MockChannelManager

type MockChannelManager struct {
	mock.Mock
}

MockChannelManager is an autogenerated mock type for the ChannelManager type

func NewMockChannelManager

func NewMockChannelManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockChannelManager

NewMockChannelManager creates a new instance of MockChannelManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockChannelManager) AddNode

func (_m *MockChannelManager) AddNode(nodeID int64) error

AddNode provides a mock function with given fields: nodeID

func (*MockChannelManager) Close

func (_m *MockChannelManager) Close()

Close provides a mock function with given fields:

func (*MockChannelManager) DeleteNode

func (_m *MockChannelManager) DeleteNode(nodeID int64) error

DeleteNode provides a mock function with given fields: nodeID

func (*MockChannelManager) EXPECT

func (*MockChannelManager) FindWatcher

func (_m *MockChannelManager) FindWatcher(channel string) (int64, error)

FindWatcher provides a mock function with given fields: channel

func (*MockChannelManager) GetChannelsByCollectionID

func (_m *MockChannelManager) GetChannelsByCollectionID(collectionID int64) []RWChannel

GetChannelsByCollectionID provides a mock function with given fields: collectionID

func (*MockChannelManager) GetCollectionIDByChannel

func (_m *MockChannelManager) GetCollectionIDByChannel(channel string) (bool, int64)

GetCollectionIDByChannel provides a mock function with given fields: channel

func (*MockChannelManager) GetNodeChannelsByCollectionID

func (_m *MockChannelManager) GetNodeChannelsByCollectionID(collectionID int64) map[int64][]string

GetNodeChannelsByCollectionID provides a mock function with given fields: collectionID

func (*MockChannelManager) GetNodeIDByChannelName

func (_m *MockChannelManager) GetNodeIDByChannelName(channel string) (bool, int64)

GetNodeIDByChannelName provides a mock function with given fields: channel

func (*MockChannelManager) Match

func (_m *MockChannelManager) Match(nodeID int64, channel string) bool

Match provides a mock function with given fields: nodeID, channel

func (*MockChannelManager) Release

func (_m *MockChannelManager) Release(nodeID int64, channelName string) error

Release provides a mock function with given fields: nodeID, channelName

func (*MockChannelManager) RemoveChannel

func (_m *MockChannelManager) RemoveChannel(channelName string) error

RemoveChannel provides a mock function with given fields: channelName

func (*MockChannelManager) Startup

func (_m *MockChannelManager) Startup(ctx context.Context, nodes []int64) error

Startup provides a mock function with given fields: ctx, nodes

func (*MockChannelManager) Watch

func (_m *MockChannelManager) Watch(ctx context.Context, ch RWChannel) error

Watch provides a mock function with given fields: ctx, ch

type MockChannelManager_AddNode_Call

type MockChannelManager_AddNode_Call struct {
	*mock.Call
}

MockChannelManager_AddNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddNode'

func (*MockChannelManager_AddNode_Call) Return

func (*MockChannelManager_AddNode_Call) Run

func (*MockChannelManager_AddNode_Call) RunAndReturn

type MockChannelManager_Close_Call

type MockChannelManager_Close_Call struct {
	*mock.Call
}

MockChannelManager_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*MockChannelManager_Close_Call) Return

func (*MockChannelManager_Close_Call) Run

func (*MockChannelManager_Close_Call) RunAndReturn

func (_c *MockChannelManager_Close_Call) RunAndReturn(run func()) *MockChannelManager_Close_Call

type MockChannelManager_DeleteNode_Call

type MockChannelManager_DeleteNode_Call struct {
	*mock.Call
}

MockChannelManager_DeleteNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteNode'

func (*MockChannelManager_DeleteNode_Call) Return

func (*MockChannelManager_DeleteNode_Call) Run

func (*MockChannelManager_DeleteNode_Call) RunAndReturn

type MockChannelManager_Expecter

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

func (*MockChannelManager_Expecter) AddNode

func (_e *MockChannelManager_Expecter) AddNode(nodeID interface{}) *MockChannelManager_AddNode_Call

AddNode is a helper method to define mock.On call

  • nodeID int64

func (*MockChannelManager_Expecter) Close

Close is a helper method to define mock.On call

func (*MockChannelManager_Expecter) DeleteNode

func (_e *MockChannelManager_Expecter) DeleteNode(nodeID interface{}) *MockChannelManager_DeleteNode_Call

DeleteNode is a helper method to define mock.On call

  • nodeID int64

func (*MockChannelManager_Expecter) FindWatcher

func (_e *MockChannelManager_Expecter) FindWatcher(channel interface{}) *MockChannelManager_FindWatcher_Call

FindWatcher is a helper method to define mock.On call

  • channel string

func (*MockChannelManager_Expecter) GetChannelsByCollectionID

func (_e *MockChannelManager_Expecter) GetChannelsByCollectionID(collectionID interface{}) *MockChannelManager_GetChannelsByCollectionID_Call

GetChannelsByCollectionID is a helper method to define mock.On call

  • collectionID int64

func (*MockChannelManager_Expecter) GetCollectionIDByChannel

func (_e *MockChannelManager_Expecter) GetCollectionIDByChannel(channel interface{}) *MockChannelManager_GetCollectionIDByChannel_Call

GetCollectionIDByChannel is a helper method to define mock.On call

  • channel string

func (*MockChannelManager_Expecter) GetNodeChannelsByCollectionID

func (_e *MockChannelManager_Expecter) GetNodeChannelsByCollectionID(collectionID interface{}) *MockChannelManager_GetNodeChannelsByCollectionID_Call

GetNodeChannelsByCollectionID is a helper method to define mock.On call

  • collectionID int64

func (*MockChannelManager_Expecter) GetNodeIDByChannelName

func (_e *MockChannelManager_Expecter) GetNodeIDByChannelName(channel interface{}) *MockChannelManager_GetNodeIDByChannelName_Call

GetNodeIDByChannelName is a helper method to define mock.On call

  • channel string

func (*MockChannelManager_Expecter) Match

func (_e *MockChannelManager_Expecter) Match(nodeID interface{}, channel interface{}) *MockChannelManager_Match_Call

Match is a helper method to define mock.On call

  • nodeID int64
  • channel string

func (*MockChannelManager_Expecter) Release

func (_e *MockChannelManager_Expecter) Release(nodeID interface{}, channelName interface{}) *MockChannelManager_Release_Call

Release is a helper method to define mock.On call

  • nodeID int64
  • channelName string

func (*MockChannelManager_Expecter) RemoveChannel

func (_e *MockChannelManager_Expecter) RemoveChannel(channelName interface{}) *MockChannelManager_RemoveChannel_Call

RemoveChannel is a helper method to define mock.On call

  • channelName string

func (*MockChannelManager_Expecter) Startup

func (_e *MockChannelManager_Expecter) Startup(ctx interface{}, nodes interface{}) *MockChannelManager_Startup_Call

Startup is a helper method to define mock.On call

  • ctx context.Context
  • nodes []int64

func (*MockChannelManager_Expecter) Watch

func (_e *MockChannelManager_Expecter) Watch(ctx interface{}, ch interface{}) *MockChannelManager_Watch_Call

Watch is a helper method to define mock.On call

  • ctx context.Context
  • ch RWChannel

type MockChannelManager_FindWatcher_Call

type MockChannelManager_FindWatcher_Call struct {
	*mock.Call
}

MockChannelManager_FindWatcher_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindWatcher'

func (*MockChannelManager_FindWatcher_Call) Return

func (*MockChannelManager_FindWatcher_Call) Run

func (*MockChannelManager_FindWatcher_Call) RunAndReturn

type MockChannelManager_GetChannelsByCollectionID_Call

type MockChannelManager_GetChannelsByCollectionID_Call struct {
	*mock.Call
}

MockChannelManager_GetChannelsByCollectionID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelsByCollectionID'

func (*MockChannelManager_GetChannelsByCollectionID_Call) Return

func (*MockChannelManager_GetChannelsByCollectionID_Call) Run

func (*MockChannelManager_GetChannelsByCollectionID_Call) RunAndReturn

type MockChannelManager_GetCollectionIDByChannel_Call

type MockChannelManager_GetCollectionIDByChannel_Call struct {
	*mock.Call
}

MockChannelManager_GetCollectionIDByChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionIDByChannel'

func (*MockChannelManager_GetCollectionIDByChannel_Call) Return

func (*MockChannelManager_GetCollectionIDByChannel_Call) Run

func (*MockChannelManager_GetCollectionIDByChannel_Call) RunAndReturn

type MockChannelManager_GetNodeChannelsByCollectionID_Call

type MockChannelManager_GetNodeChannelsByCollectionID_Call struct {
	*mock.Call
}

MockChannelManager_GetNodeChannelsByCollectionID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNodeChannelsByCollectionID'

func (*MockChannelManager_GetNodeChannelsByCollectionID_Call) Return

func (*MockChannelManager_GetNodeChannelsByCollectionID_Call) Run

func (*MockChannelManager_GetNodeChannelsByCollectionID_Call) RunAndReturn

type MockChannelManager_GetNodeIDByChannelName_Call

type MockChannelManager_GetNodeIDByChannelName_Call struct {
	*mock.Call
}

MockChannelManager_GetNodeIDByChannelName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNodeIDByChannelName'

func (*MockChannelManager_GetNodeIDByChannelName_Call) Return

func (*MockChannelManager_GetNodeIDByChannelName_Call) Run

func (*MockChannelManager_GetNodeIDByChannelName_Call) RunAndReturn

type MockChannelManager_Match_Call

type MockChannelManager_Match_Call struct {
	*mock.Call
}

MockChannelManager_Match_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Match'

func (*MockChannelManager_Match_Call) Return

func (*MockChannelManager_Match_Call) Run

func (_c *MockChannelManager_Match_Call) Run(run func(nodeID int64, channel string)) *MockChannelManager_Match_Call

func (*MockChannelManager_Match_Call) RunAndReturn

type MockChannelManager_Release_Call

type MockChannelManager_Release_Call struct {
	*mock.Call
}

MockChannelManager_Release_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Release'

func (*MockChannelManager_Release_Call) Return

func (*MockChannelManager_Release_Call) Run

func (_c *MockChannelManager_Release_Call) Run(run func(nodeID int64, channelName string)) *MockChannelManager_Release_Call

func (*MockChannelManager_Release_Call) RunAndReturn

type MockChannelManager_RemoveChannel_Call

type MockChannelManager_RemoveChannel_Call struct {
	*mock.Call
}

MockChannelManager_RemoveChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveChannel'

func (*MockChannelManager_RemoveChannel_Call) Return

func (*MockChannelManager_RemoveChannel_Call) Run

func (*MockChannelManager_RemoveChannel_Call) RunAndReturn

type MockChannelManager_Startup_Call

type MockChannelManager_Startup_Call struct {
	*mock.Call
}

MockChannelManager_Startup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Startup'

func (*MockChannelManager_Startup_Call) Return

func (*MockChannelManager_Startup_Call) Run

func (*MockChannelManager_Startup_Call) RunAndReturn

type MockChannelManager_Watch_Call

type MockChannelManager_Watch_Call struct {
	*mock.Call
}

MockChannelManager_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch'

func (*MockChannelManager_Watch_Call) Return

func (*MockChannelManager_Watch_Call) Run

func (*MockChannelManager_Watch_Call) RunAndReturn

type MockCluster

type MockCluster struct {
	mock.Mock
}

MockCluster is an autogenerated mock type for the Cluster type

func NewMockCluster

func NewMockCluster(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCluster

NewMockCluster creates a new instance of MockCluster. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockCluster) Close

func (_m *MockCluster) Close()

Close provides a mock function with given fields:

func (*MockCluster) DropImport

func (_m *MockCluster) DropImport(nodeID int64, in *datapb.DropImportRequest) error

DropImport provides a mock function with given fields: nodeID, in

func (*MockCluster) EXPECT

func (_m *MockCluster) EXPECT() *MockCluster_Expecter

func (*MockCluster) Flush

func (_m *MockCluster) Flush(ctx context.Context, nodeID int64, channel string, segments []*datapb.SegmentInfo) error

Flush provides a mock function with given fields: ctx, nodeID, channel, segments

func (*MockCluster) FlushChannels

func (_m *MockCluster) FlushChannels(ctx context.Context, nodeID int64, flushTs uint64, channels []string) error

FlushChannels provides a mock function with given fields: ctx, nodeID, flushTs, channels

func (*MockCluster) GetSessions

func (_m *MockCluster) GetSessions() []*Session

GetSessions provides a mock function with given fields:

func (*MockCluster) ImportV2

func (_m *MockCluster) ImportV2(nodeID int64, in *datapb.ImportRequest) error

ImportV2 provides a mock function with given fields: nodeID, in

func (*MockCluster) PreImport

func (_m *MockCluster) PreImport(nodeID int64, in *datapb.PreImportRequest) error

PreImport provides a mock function with given fields: nodeID, in

func (*MockCluster) QueryImport

func (_m *MockCluster) QueryImport(nodeID int64, in *datapb.QueryImportRequest) (*datapb.QueryImportResponse, error)

QueryImport provides a mock function with given fields: nodeID, in

func (*MockCluster) QueryPreImport

func (_m *MockCluster) QueryPreImport(nodeID int64, in *datapb.QueryPreImportRequest) (*datapb.QueryPreImportResponse, error)

QueryPreImport provides a mock function with given fields: nodeID, in

func (*MockCluster) Register

func (_m *MockCluster) Register(node *NodeInfo) error

Register provides a mock function with given fields: node

func (*MockCluster) Startup

func (_m *MockCluster) Startup(ctx context.Context, nodes []*NodeInfo) error

Startup provides a mock function with given fields: ctx, nodes

func (*MockCluster) UnRegister

func (_m *MockCluster) UnRegister(node *NodeInfo) error

UnRegister provides a mock function with given fields: node

func (*MockCluster) Watch

func (_m *MockCluster) Watch(ctx context.Context, ch string, collectionID int64) error

Watch provides a mock function with given fields: ctx, ch, collectionID

type MockCluster_Close_Call

type MockCluster_Close_Call struct {
	*mock.Call
}

MockCluster_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*MockCluster_Close_Call) Return

func (*MockCluster_Close_Call) Run

func (_c *MockCluster_Close_Call) Run(run func()) *MockCluster_Close_Call

func (*MockCluster_Close_Call) RunAndReturn

func (_c *MockCluster_Close_Call) RunAndReturn(run func()) *MockCluster_Close_Call

type MockCluster_DropImport_Call

type MockCluster_DropImport_Call struct {
	*mock.Call
}

MockCluster_DropImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropImport'

func (*MockCluster_DropImport_Call) Return

func (*MockCluster_DropImport_Call) Run

func (*MockCluster_DropImport_Call) RunAndReturn

type MockCluster_Expecter

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

func (*MockCluster_Expecter) Close

Close is a helper method to define mock.On call

func (*MockCluster_Expecter) DropImport

func (_e *MockCluster_Expecter) DropImport(nodeID interface{}, in interface{}) *MockCluster_DropImport_Call

DropImport is a helper method to define mock.On call

  • nodeID int64
  • in *datapb.DropImportRequest

func (*MockCluster_Expecter) Flush

func (_e *MockCluster_Expecter) Flush(ctx interface{}, nodeID interface{}, channel interface{}, segments interface{}) *MockCluster_Flush_Call

Flush is a helper method to define mock.On call

  • ctx context.Context
  • nodeID int64
  • channel string
  • segments []*datapb.SegmentInfo

func (*MockCluster_Expecter) FlushChannels

func (_e *MockCluster_Expecter) FlushChannels(ctx interface{}, nodeID interface{}, flushTs interface{}, channels interface{}) *MockCluster_FlushChannels_Call

FlushChannels is a helper method to define mock.On call

  • ctx context.Context
  • nodeID int64
  • flushTs uint64
  • channels []string

func (*MockCluster_Expecter) GetSessions

GetSessions is a helper method to define mock.On call

func (*MockCluster_Expecter) ImportV2

func (_e *MockCluster_Expecter) ImportV2(nodeID interface{}, in interface{}) *MockCluster_ImportV2_Call

ImportV2 is a helper method to define mock.On call

  • nodeID int64
  • in *datapb.ImportRequest

func (*MockCluster_Expecter) PreImport

func (_e *MockCluster_Expecter) PreImport(nodeID interface{}, in interface{}) *MockCluster_PreImport_Call

PreImport is a helper method to define mock.On call

  • nodeID int64
  • in *datapb.PreImportRequest

func (*MockCluster_Expecter) QueryImport

func (_e *MockCluster_Expecter) QueryImport(nodeID interface{}, in interface{}) *MockCluster_QueryImport_Call

QueryImport is a helper method to define mock.On call

  • nodeID int64
  • in *datapb.QueryImportRequest

func (*MockCluster_Expecter) QueryPreImport

func (_e *MockCluster_Expecter) QueryPreImport(nodeID interface{}, in interface{}) *MockCluster_QueryPreImport_Call

QueryPreImport is a helper method to define mock.On call

  • nodeID int64
  • in *datapb.QueryPreImportRequest

func (*MockCluster_Expecter) Register

func (_e *MockCluster_Expecter) Register(node interface{}) *MockCluster_Register_Call

Register is a helper method to define mock.On call

  • node *NodeInfo

func (*MockCluster_Expecter) Startup

func (_e *MockCluster_Expecter) Startup(ctx interface{}, nodes interface{}) *MockCluster_Startup_Call

Startup is a helper method to define mock.On call

  • ctx context.Context
  • nodes []*NodeInfo

func (*MockCluster_Expecter) UnRegister

func (_e *MockCluster_Expecter) UnRegister(node interface{}) *MockCluster_UnRegister_Call

UnRegister is a helper method to define mock.On call

  • node *NodeInfo

func (*MockCluster_Expecter) Watch

func (_e *MockCluster_Expecter) Watch(ctx interface{}, ch interface{}, collectionID interface{}) *MockCluster_Watch_Call

Watch is a helper method to define mock.On call

  • ctx context.Context
  • ch string
  • collectionID int64

type MockCluster_FlushChannels_Call

type MockCluster_FlushChannels_Call struct {
	*mock.Call
}

MockCluster_FlushChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlushChannels'

func (*MockCluster_FlushChannels_Call) Return

func (*MockCluster_FlushChannels_Call) Run

func (_c *MockCluster_FlushChannels_Call) Run(run func(ctx context.Context, nodeID int64, flushTs uint64, channels []string)) *MockCluster_FlushChannels_Call

func (*MockCluster_FlushChannels_Call) RunAndReturn

type MockCluster_Flush_Call

type MockCluster_Flush_Call struct {
	*mock.Call
}

MockCluster_Flush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Flush'

func (*MockCluster_Flush_Call) Return

func (*MockCluster_Flush_Call) Run

func (_c *MockCluster_Flush_Call) Run(run func(ctx context.Context, nodeID int64, channel string, segments []*datapb.SegmentInfo)) *MockCluster_Flush_Call

func (*MockCluster_Flush_Call) RunAndReturn

type MockCluster_GetSessions_Call

type MockCluster_GetSessions_Call struct {
	*mock.Call
}

MockCluster_GetSessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSessions'

func (*MockCluster_GetSessions_Call) Return

func (*MockCluster_GetSessions_Call) Run

func (*MockCluster_GetSessions_Call) RunAndReturn

func (_c *MockCluster_GetSessions_Call) RunAndReturn(run func() []*Session) *MockCluster_GetSessions_Call

type MockCluster_ImportV2_Call

type MockCluster_ImportV2_Call struct {
	*mock.Call
}

MockCluster_ImportV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ImportV2'

func (*MockCluster_ImportV2_Call) Return

func (*MockCluster_ImportV2_Call) Run

func (*MockCluster_ImportV2_Call) RunAndReturn

type MockCluster_PreImport_Call

type MockCluster_PreImport_Call struct {
	*mock.Call
}

MockCluster_PreImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PreImport'

func (*MockCluster_PreImport_Call) Return

func (*MockCluster_PreImport_Call) Run

func (*MockCluster_PreImport_Call) RunAndReturn

type MockCluster_QueryImport_Call

type MockCluster_QueryImport_Call struct {
	*mock.Call
}

MockCluster_QueryImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryImport'

func (*MockCluster_QueryImport_Call) Return

func (*MockCluster_QueryImport_Call) Run

func (*MockCluster_QueryImport_Call) RunAndReturn

type MockCluster_QueryPreImport_Call

type MockCluster_QueryPreImport_Call struct {
	*mock.Call
}

MockCluster_QueryPreImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryPreImport'

func (*MockCluster_QueryPreImport_Call) Return

func (*MockCluster_QueryPreImport_Call) Run

type MockCluster_Register_Call

type MockCluster_Register_Call struct {
	*mock.Call
}

MockCluster_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register'

func (*MockCluster_Register_Call) Return

func (*MockCluster_Register_Call) Run

func (*MockCluster_Register_Call) RunAndReturn

func (_c *MockCluster_Register_Call) RunAndReturn(run func(*NodeInfo) error) *MockCluster_Register_Call

type MockCluster_Startup_Call

type MockCluster_Startup_Call struct {
	*mock.Call
}

MockCluster_Startup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Startup'

func (*MockCluster_Startup_Call) Return

func (*MockCluster_Startup_Call) Run

func (_c *MockCluster_Startup_Call) Run(run func(ctx context.Context, nodes []*NodeInfo)) *MockCluster_Startup_Call

func (*MockCluster_Startup_Call) RunAndReturn

type MockCluster_UnRegister_Call

type MockCluster_UnRegister_Call struct {
	*mock.Call
}

MockCluster_UnRegister_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnRegister'

func (*MockCluster_UnRegister_Call) Return

func (*MockCluster_UnRegister_Call) Run

func (*MockCluster_UnRegister_Call) RunAndReturn

type MockCluster_Watch_Call

type MockCluster_Watch_Call struct {
	*mock.Call
}

MockCluster_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch'

func (*MockCluster_Watch_Call) Return

func (*MockCluster_Watch_Call) Run

func (_c *MockCluster_Watch_Call) Run(run func(ctx context.Context, ch string, collectionID int64)) *MockCluster_Watch_Call

func (*MockCluster_Watch_Call) RunAndReturn

type MockCompactionMeta

type MockCompactionMeta struct {
	mock.Mock
}

MockCompactionMeta is an autogenerated mock type for the CompactionMeta type

func NewMockCompactionMeta

func NewMockCompactionMeta(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCompactionMeta

NewMockCompactionMeta creates a new instance of MockCompactionMeta. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockCompactionMeta) CompleteCompactionMutation

func (_m *MockCompactionMeta) CompleteCompactionMutation(plan *datapb.CompactionPlan, result *datapb.CompactionPlanResult) ([]*SegmentInfo, *segMetricMutation, error)

CompleteCompactionMutation provides a mock function with given fields: plan, result

func (*MockCompactionMeta) EXPECT

func (*MockCompactionMeta) GetHealthySegment

func (_m *MockCompactionMeta) GetHealthySegment(segID int64) *SegmentInfo

GetHealthySegment provides a mock function with given fields: segID

func (*MockCompactionMeta) SelectSegments

func (_m *MockCompactionMeta) SelectSegments(selector SegmentInfoSelector) []*SegmentInfo

SelectSegments provides a mock function with given fields: selector

func (*MockCompactionMeta) SetSegmentCompacting

func (_m *MockCompactionMeta) SetSegmentCompacting(segmentID int64, compacting bool)

SetSegmentCompacting provides a mock function with given fields: segmentID, compacting

func (*MockCompactionMeta) UpdateSegmentsInfo

func (_m *MockCompactionMeta) UpdateSegmentsInfo(operators ...UpdateOperator) error

UpdateSegmentsInfo provides a mock function with given fields: operators

type MockCompactionMeta_CompleteCompactionMutation_Call

type MockCompactionMeta_CompleteCompactionMutation_Call struct {
	*mock.Call
}

MockCompactionMeta_CompleteCompactionMutation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CompleteCompactionMutation'

func (*MockCompactionMeta_CompleteCompactionMutation_Call) Return

func (*MockCompactionMeta_CompleteCompactionMutation_Call) Run

func (*MockCompactionMeta_CompleteCompactionMutation_Call) RunAndReturn

type MockCompactionMeta_Expecter

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

func (*MockCompactionMeta_Expecter) CompleteCompactionMutation

func (_e *MockCompactionMeta_Expecter) CompleteCompactionMutation(plan interface{}, result interface{}) *MockCompactionMeta_CompleteCompactionMutation_Call

CompleteCompactionMutation is a helper method to define mock.On call

  • plan *datapb.CompactionPlan
  • result *datapb.CompactionPlanResult

func (*MockCompactionMeta_Expecter) GetHealthySegment

func (_e *MockCompactionMeta_Expecter) GetHealthySegment(segID interface{}) *MockCompactionMeta_GetHealthySegment_Call

GetHealthySegment is a helper method to define mock.On call

  • segID int64

func (*MockCompactionMeta_Expecter) SelectSegments

func (_e *MockCompactionMeta_Expecter) SelectSegments(selector interface{}) *MockCompactionMeta_SelectSegments_Call

SelectSegments is a helper method to define mock.On call

  • selector SegmentInfoSelector

func (*MockCompactionMeta_Expecter) SetSegmentCompacting

func (_e *MockCompactionMeta_Expecter) SetSegmentCompacting(segmentID interface{}, compacting interface{}) *MockCompactionMeta_SetSegmentCompacting_Call

SetSegmentCompacting is a helper method to define mock.On call

  • segmentID int64
  • compacting bool

func (*MockCompactionMeta_Expecter) UpdateSegmentsInfo

func (_e *MockCompactionMeta_Expecter) UpdateSegmentsInfo(operators ...interface{}) *MockCompactionMeta_UpdateSegmentsInfo_Call

UpdateSegmentsInfo is a helper method to define mock.On call

  • operators ...UpdateOperator

type MockCompactionMeta_GetHealthySegment_Call

type MockCompactionMeta_GetHealthySegment_Call struct {
	*mock.Call
}

MockCompactionMeta_GetHealthySegment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHealthySegment'

func (*MockCompactionMeta_GetHealthySegment_Call) Return

func (*MockCompactionMeta_GetHealthySegment_Call) Run

func (*MockCompactionMeta_GetHealthySegment_Call) RunAndReturn

type MockCompactionMeta_SelectSegments_Call

type MockCompactionMeta_SelectSegments_Call struct {
	*mock.Call
}

MockCompactionMeta_SelectSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectSegments'

func (*MockCompactionMeta_SelectSegments_Call) Return

func (*MockCompactionMeta_SelectSegments_Call) Run

func (*MockCompactionMeta_SelectSegments_Call) RunAndReturn

type MockCompactionMeta_SetSegmentCompacting_Call

type MockCompactionMeta_SetSegmentCompacting_Call struct {
	*mock.Call
}

MockCompactionMeta_SetSegmentCompacting_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSegmentCompacting'

func (*MockCompactionMeta_SetSegmentCompacting_Call) Return

func (*MockCompactionMeta_SetSegmentCompacting_Call) Run

func (*MockCompactionMeta_SetSegmentCompacting_Call) RunAndReturn

type MockCompactionMeta_UpdateSegmentsInfo_Call

type MockCompactionMeta_UpdateSegmentsInfo_Call struct {
	*mock.Call
}

MockCompactionMeta_UpdateSegmentsInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSegmentsInfo'

func (*MockCompactionMeta_UpdateSegmentsInfo_Call) Return

func (*MockCompactionMeta_UpdateSegmentsInfo_Call) Run

func (*MockCompactionMeta_UpdateSegmentsInfo_Call) RunAndReturn

type MockCompactionPlanContext

type MockCompactionPlanContext struct {
	mock.Mock
}

MockCompactionPlanContext is an autogenerated mock type for the compactionPlanContext type

func NewMockCompactionPlanContext

func NewMockCompactionPlanContext(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCompactionPlanContext

NewMockCompactionPlanContext creates a new instance of MockCompactionPlanContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockCompactionPlanContext) EXPECT

type MockCompactionPlanContext_Expecter

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

type MockCompactionPlanContext_execCompactionPlan_Call

type MockCompactionPlanContext_execCompactionPlan_Call struct {
	*mock.Call
}

MockCompactionPlanContext_execCompactionPlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'execCompactionPlan'

func (*MockCompactionPlanContext_execCompactionPlan_Call) Return

func (*MockCompactionPlanContext_execCompactionPlan_Call) Run

func (*MockCompactionPlanContext_execCompactionPlan_Call) RunAndReturn

type MockCompactionPlanContext_getCompactionTasksBySignalID_Call

type MockCompactionPlanContext_getCompactionTasksBySignalID_Call struct {
	*mock.Call
}

MockCompactionPlanContext_getCompactionTasksBySignalID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getCompactionTasksBySignalID'

func (*MockCompactionPlanContext_getCompactionTasksBySignalID_Call) Return

func (*MockCompactionPlanContext_getCompactionTasksBySignalID_Call) Run

func (*MockCompactionPlanContext_getCompactionTasksBySignalID_Call) RunAndReturn

type MockCompactionPlanContext_getCompaction_Call

type MockCompactionPlanContext_getCompaction_Call struct {
	*mock.Call
}

MockCompactionPlanContext_getCompaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getCompaction'

func (*MockCompactionPlanContext_getCompaction_Call) Return

func (*MockCompactionPlanContext_getCompaction_Call) Run

func (*MockCompactionPlanContext_getCompaction_Call) RunAndReturn

type MockCompactionPlanContext_isFull_Call

type MockCompactionPlanContext_isFull_Call struct {
	*mock.Call
}

MockCompactionPlanContext_isFull_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'isFull'

func (*MockCompactionPlanContext_isFull_Call) Return

func (*MockCompactionPlanContext_isFull_Call) Run

func (*MockCompactionPlanContext_isFull_Call) RunAndReturn

type MockCompactionPlanContext_removeTasksByChannel_Call

type MockCompactionPlanContext_removeTasksByChannel_Call struct {
	*mock.Call
}

MockCompactionPlanContext_removeTasksByChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'removeTasksByChannel'

func (*MockCompactionPlanContext_removeTasksByChannel_Call) Return

func (*MockCompactionPlanContext_removeTasksByChannel_Call) Run

func (*MockCompactionPlanContext_removeTasksByChannel_Call) RunAndReturn

type MockCompactionPlanContext_start_Call

type MockCompactionPlanContext_start_Call struct {
	*mock.Call
}

MockCompactionPlanContext_start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'start'

func (*MockCompactionPlanContext_start_Call) Return

func (*MockCompactionPlanContext_start_Call) Run

func (*MockCompactionPlanContext_start_Call) RunAndReturn

type MockCompactionPlanContext_stop_Call

type MockCompactionPlanContext_stop_Call struct {
	*mock.Call
}

MockCompactionPlanContext_stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'stop'

func (*MockCompactionPlanContext_stop_Call) Return

func (*MockCompactionPlanContext_stop_Call) Run

func (*MockCompactionPlanContext_stop_Call) RunAndReturn

type MockCompactionPlanContext_updateCompaction_Call

type MockCompactionPlanContext_updateCompaction_Call struct {
	*mock.Call
}

MockCompactionPlanContext_updateCompaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'updateCompaction'

func (*MockCompactionPlanContext_updateCompaction_Call) Return

func (*MockCompactionPlanContext_updateCompaction_Call) Run

func (*MockCompactionPlanContext_updateCompaction_Call) RunAndReturn

type MockManager

type MockManager struct {
	mock.Mock
}

MockManager is an autogenerated mock type for the Manager type

func NewMockManager

func NewMockManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockManager

NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockManager) AllocImportSegment

func (_m *MockManager) AllocImportSegment(ctx context.Context, taskID int64, collectionID int64, partitionID int64, channelName string) (*SegmentInfo, error)

AllocImportSegment provides a mock function with given fields: ctx, taskID, collectionID, partitionID, channelName

func (*MockManager) AllocSegment

func (_m *MockManager) AllocSegment(ctx context.Context, collectionID int64, partitionID int64, channelName string, requestRows int64) ([]*Allocation, error)

AllocSegment provides a mock function with given fields: ctx, collectionID, partitionID, channelName, requestRows

func (*MockManager) DropSegment

func (_m *MockManager) DropSegment(ctx context.Context, segmentID int64)

DropSegment provides a mock function with given fields: ctx, segmentID

func (*MockManager) DropSegmentsOfChannel

func (_m *MockManager) DropSegmentsOfChannel(ctx context.Context, channel string)

DropSegmentsOfChannel provides a mock function with given fields: ctx, channel

func (*MockManager) EXPECT

func (_m *MockManager) EXPECT() *MockManager_Expecter

func (*MockManager) ExpireAllocations

func (_m *MockManager) ExpireAllocations(channel string, ts uint64) error

ExpireAllocations provides a mock function with given fields: channel, ts

func (*MockManager) FlushImportSegments

func (_m *MockManager) FlushImportSegments(ctx context.Context, collectionID int64, segmentIDs []int64) error

FlushImportSegments provides a mock function with given fields: ctx, collectionID, segmentIDs

func (*MockManager) GetFlushableSegments

func (_m *MockManager) GetFlushableSegments(ctx context.Context, channel string, ts uint64) ([]int64, error)

GetFlushableSegments provides a mock function with given fields: ctx, channel, ts

func (*MockManager) SealAllSegments

func (_m *MockManager) SealAllSegments(ctx context.Context, collectionID int64, segIDs []int64) ([]int64, error)

SealAllSegments provides a mock function with given fields: ctx, collectionID, segIDs

type MockManager_AllocImportSegment_Call

type MockManager_AllocImportSegment_Call struct {
	*mock.Call
}

MockManager_AllocImportSegment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllocImportSegment'

func (*MockManager_AllocImportSegment_Call) Return

func (*MockManager_AllocImportSegment_Call) Run

func (_c *MockManager_AllocImportSegment_Call) Run(run func(ctx context.Context, taskID int64, collectionID int64, partitionID int64, channelName string)) *MockManager_AllocImportSegment_Call

func (*MockManager_AllocImportSegment_Call) RunAndReturn

type MockManager_AllocSegment_Call

type MockManager_AllocSegment_Call struct {
	*mock.Call
}

MockManager_AllocSegment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllocSegment'

func (*MockManager_AllocSegment_Call) Return

func (*MockManager_AllocSegment_Call) Run

func (_c *MockManager_AllocSegment_Call) Run(run func(ctx context.Context, collectionID int64, partitionID int64, channelName string, requestRows int64)) *MockManager_AllocSegment_Call

func (*MockManager_AllocSegment_Call) RunAndReturn

type MockManager_DropSegment_Call

type MockManager_DropSegment_Call struct {
	*mock.Call
}

MockManager_DropSegment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropSegment'

func (*MockManager_DropSegment_Call) Return

func (*MockManager_DropSegment_Call) Run

func (*MockManager_DropSegment_Call) RunAndReturn

type MockManager_DropSegmentsOfChannel_Call

type MockManager_DropSegmentsOfChannel_Call struct {
	*mock.Call
}

MockManager_DropSegmentsOfChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropSegmentsOfChannel'

func (*MockManager_DropSegmentsOfChannel_Call) Return

func (*MockManager_DropSegmentsOfChannel_Call) Run

func (*MockManager_DropSegmentsOfChannel_Call) RunAndReturn

type MockManager_Expecter

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

func (*MockManager_Expecter) AllocImportSegment

func (_e *MockManager_Expecter) AllocImportSegment(ctx interface{}, taskID interface{}, collectionID interface{}, partitionID interface{}, channelName interface{}) *MockManager_AllocImportSegment_Call

AllocImportSegment is a helper method to define mock.On call

  • ctx context.Context
  • taskID int64
  • collectionID int64
  • partitionID int64
  • channelName string

func (*MockManager_Expecter) AllocSegment

func (_e *MockManager_Expecter) AllocSegment(ctx interface{}, collectionID interface{}, partitionID interface{}, channelName interface{}, requestRows interface{}) *MockManager_AllocSegment_Call

AllocSegment is a helper method to define mock.On call

  • ctx context.Context
  • collectionID int64
  • partitionID int64
  • channelName string
  • requestRows int64

func (*MockManager_Expecter) DropSegment

func (_e *MockManager_Expecter) DropSegment(ctx interface{}, segmentID interface{}) *MockManager_DropSegment_Call

DropSegment is a helper method to define mock.On call

  • ctx context.Context
  • segmentID int64

func (*MockManager_Expecter) DropSegmentsOfChannel

func (_e *MockManager_Expecter) DropSegmentsOfChannel(ctx interface{}, channel interface{}) *MockManager_DropSegmentsOfChannel_Call

DropSegmentsOfChannel is a helper method to define mock.On call

  • ctx context.Context
  • channel string

func (*MockManager_Expecter) ExpireAllocations

func (_e *MockManager_Expecter) ExpireAllocations(channel interface{}, ts interface{}) *MockManager_ExpireAllocations_Call

ExpireAllocations is a helper method to define mock.On call

  • channel string
  • ts uint64

func (*MockManager_Expecter) FlushImportSegments

func (_e *MockManager_Expecter) FlushImportSegments(ctx interface{}, collectionID interface{}, segmentIDs interface{}) *MockManager_FlushImportSegments_Call

FlushImportSegments is a helper method to define mock.On call

  • ctx context.Context
  • collectionID int64
  • segmentIDs []int64

func (*MockManager_Expecter) GetFlushableSegments

func (_e *MockManager_Expecter) GetFlushableSegments(ctx interface{}, channel interface{}, ts interface{}) *MockManager_GetFlushableSegments_Call

GetFlushableSegments is a helper method to define mock.On call

  • ctx context.Context
  • channel string
  • ts uint64

func (*MockManager_Expecter) SealAllSegments

func (_e *MockManager_Expecter) SealAllSegments(ctx interface{}, collectionID interface{}, segIDs interface{}) *MockManager_SealAllSegments_Call

SealAllSegments is a helper method to define mock.On call

  • ctx context.Context
  • collectionID int64
  • segIDs []int64

type MockManager_ExpireAllocations_Call

type MockManager_ExpireAllocations_Call struct {
	*mock.Call
}

MockManager_ExpireAllocations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExpireAllocations'

func (*MockManager_ExpireAllocations_Call) Return

func (*MockManager_ExpireAllocations_Call) Run

func (*MockManager_ExpireAllocations_Call) RunAndReturn

type MockManager_FlushImportSegments_Call

type MockManager_FlushImportSegments_Call struct {
	*mock.Call
}

MockManager_FlushImportSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlushImportSegments'

func (*MockManager_FlushImportSegments_Call) Return

func (*MockManager_FlushImportSegments_Call) Run

func (_c *MockManager_FlushImportSegments_Call) Run(run func(ctx context.Context, collectionID int64, segmentIDs []int64)) *MockManager_FlushImportSegments_Call

func (*MockManager_FlushImportSegments_Call) RunAndReturn

type MockManager_GetFlushableSegments_Call

type MockManager_GetFlushableSegments_Call struct {
	*mock.Call
}

MockManager_GetFlushableSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFlushableSegments'

func (*MockManager_GetFlushableSegments_Call) Return

func (*MockManager_GetFlushableSegments_Call) Run

func (*MockManager_GetFlushableSegments_Call) RunAndReturn

type MockManager_SealAllSegments_Call

type MockManager_SealAllSegments_Call struct {
	*mock.Call
}

MockManager_SealAllSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SealAllSegments'

func (*MockManager_SealAllSegments_Call) Return

func (*MockManager_SealAllSegments_Call) Run

func (_c *MockManager_SealAllSegments_Call) Run(run func(ctx context.Context, collectionID int64, segIDs []int64)) *MockManager_SealAllSegments_Call

func (*MockManager_SealAllSegments_Call) RunAndReturn

type MockManager_allocSegmentForImport_Call

type MockManager_allocSegmentForImport_Call struct {
	*mock.Call
}

MockManager_allocSegmentForImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'allocSegmentForImport'

func (*MockManager_allocSegmentForImport_Call) Return

func (*MockManager_allocSegmentForImport_Call) Run

func (_c *MockManager_allocSegmentForImport_Call) Run(run func(ctx context.Context, collectionID int64, partitionID int64, channelName string, requestRows int64, taskID int64)) *MockManager_allocSegmentForImport_Call

func (*MockManager_allocSegmentForImport_Call) RunAndReturn

type MockRWChannelStore

type MockRWChannelStore struct {
	mock.Mock
}

MockRWChannelStore is an autogenerated mock type for the RWChannelStore type

func NewMockRWChannelStore

func NewMockRWChannelStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRWChannelStore

NewMockRWChannelStore creates a new instance of MockRWChannelStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockRWChannelStore) Add

func (_m *MockRWChannelStore) Add(nodeID int64)

Add provides a mock function with given fields: nodeID

func (*MockRWChannelStore) Delete

func (_m *MockRWChannelStore) Delete(nodeID int64) ([]RWChannel, error)

Delete provides a mock function with given fields: nodeID

func (*MockRWChannelStore) EXPECT

func (*MockRWChannelStore) GetBufferChannelInfo

func (_m *MockRWChannelStore) GetBufferChannelInfo() *NodeChannelInfo

GetBufferChannelInfo provides a mock function with given fields:

func (*MockRWChannelStore) GetChannels

func (_m *MockRWChannelStore) GetChannels() []*NodeChannelInfo

GetChannels provides a mock function with given fields:

func (*MockRWChannelStore) GetNode

func (_m *MockRWChannelStore) GetNode(nodeID int64) *NodeChannelInfo

GetNode provides a mock function with given fields: nodeID

func (*MockRWChannelStore) GetNodeChannelCount

func (_m *MockRWChannelStore) GetNodeChannelCount(nodeID int64) int

GetNodeChannelCount provides a mock function with given fields: nodeID

func (*MockRWChannelStore) GetNodes

func (_m *MockRWChannelStore) GetNodes() []int64

GetNodes provides a mock function with given fields:

func (*MockRWChannelStore) GetNodesChannels

func (_m *MockRWChannelStore) GetNodesChannels() []*NodeChannelInfo

GetNodesChannels provides a mock function with given fields:

func (*MockRWChannelStore) Reload

func (_m *MockRWChannelStore) Reload() error

Reload provides a mock function with given fields:

func (*MockRWChannelStore) Update

func (_m *MockRWChannelStore) Update(op *ChannelOpSet) error

Update provides a mock function with given fields: op

type MockRWChannelStore_Add_Call

type MockRWChannelStore_Add_Call struct {
	*mock.Call
}

MockRWChannelStore_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'

func (*MockRWChannelStore_Add_Call) Return

func (*MockRWChannelStore_Add_Call) Run

func (*MockRWChannelStore_Add_Call) RunAndReturn

func (_c *MockRWChannelStore_Add_Call) RunAndReturn(run func(int64)) *MockRWChannelStore_Add_Call

type MockRWChannelStore_Delete_Call

type MockRWChannelStore_Delete_Call struct {
	*mock.Call
}

MockRWChannelStore_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'

func (*MockRWChannelStore_Delete_Call) Return

func (*MockRWChannelStore_Delete_Call) Run

func (*MockRWChannelStore_Delete_Call) RunAndReturn

type MockRWChannelStore_Expecter

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

func (*MockRWChannelStore_Expecter) Add

func (_e *MockRWChannelStore_Expecter) Add(nodeID interface{}) *MockRWChannelStore_Add_Call

Add is a helper method to define mock.On call

  • nodeID int64

func (*MockRWChannelStore_Expecter) Delete

func (_e *MockRWChannelStore_Expecter) Delete(nodeID interface{}) *MockRWChannelStore_Delete_Call

Delete is a helper method to define mock.On call

  • nodeID int64

func (*MockRWChannelStore_Expecter) GetBufferChannelInfo

GetBufferChannelInfo is a helper method to define mock.On call

func (*MockRWChannelStore_Expecter) GetChannels

GetChannels is a helper method to define mock.On call

func (*MockRWChannelStore_Expecter) GetNode

func (_e *MockRWChannelStore_Expecter) GetNode(nodeID interface{}) *MockRWChannelStore_GetNode_Call

GetNode is a helper method to define mock.On call

  • nodeID int64

func (*MockRWChannelStore_Expecter) GetNodeChannelCount

func (_e *MockRWChannelStore_Expecter) GetNodeChannelCount(nodeID interface{}) *MockRWChannelStore_GetNodeChannelCount_Call

GetNodeChannelCount is a helper method to define mock.On call

  • nodeID int64

func (*MockRWChannelStore_Expecter) GetNodes

GetNodes is a helper method to define mock.On call

func (*MockRWChannelStore_Expecter) GetNodesChannels

GetNodesChannels is a helper method to define mock.On call

func (*MockRWChannelStore_Expecter) Reload

Reload is a helper method to define mock.On call

func (*MockRWChannelStore_Expecter) Update

func (_e *MockRWChannelStore_Expecter) Update(op interface{}) *MockRWChannelStore_Update_Call

Update is a helper method to define mock.On call

  • op *ChannelOpSet

type MockRWChannelStore_GetBufferChannelInfo_Call

type MockRWChannelStore_GetBufferChannelInfo_Call struct {
	*mock.Call
}

MockRWChannelStore_GetBufferChannelInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBufferChannelInfo'

func (*MockRWChannelStore_GetBufferChannelInfo_Call) Return

func (*MockRWChannelStore_GetBufferChannelInfo_Call) Run

func (*MockRWChannelStore_GetBufferChannelInfo_Call) RunAndReturn

type MockRWChannelStore_GetChannels_Call

type MockRWChannelStore_GetChannels_Call struct {
	*mock.Call
}

MockRWChannelStore_GetChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannels'

func (*MockRWChannelStore_GetChannels_Call) Return

func (*MockRWChannelStore_GetChannels_Call) Run

func (*MockRWChannelStore_GetChannels_Call) RunAndReturn

type MockRWChannelStore_GetNodeChannelCount_Call

type MockRWChannelStore_GetNodeChannelCount_Call struct {
	*mock.Call
}

MockRWChannelStore_GetNodeChannelCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNodeChannelCount'

func (*MockRWChannelStore_GetNodeChannelCount_Call) Return

func (*MockRWChannelStore_GetNodeChannelCount_Call) Run

func (*MockRWChannelStore_GetNodeChannelCount_Call) RunAndReturn

type MockRWChannelStore_GetNode_Call

type MockRWChannelStore_GetNode_Call struct {
	*mock.Call
}

MockRWChannelStore_GetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNode'

func (*MockRWChannelStore_GetNode_Call) Return

func (*MockRWChannelStore_GetNode_Call) Run

func (*MockRWChannelStore_GetNode_Call) RunAndReturn

type MockRWChannelStore_GetNodesChannels_Call

type MockRWChannelStore_GetNodesChannels_Call struct {
	*mock.Call
}

MockRWChannelStore_GetNodesChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNodesChannels'

func (*MockRWChannelStore_GetNodesChannels_Call) Return

func (*MockRWChannelStore_GetNodesChannels_Call) Run

func (*MockRWChannelStore_GetNodesChannels_Call) RunAndReturn

type MockRWChannelStore_GetNodes_Call

type MockRWChannelStore_GetNodes_Call struct {
	*mock.Call
}

MockRWChannelStore_GetNodes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNodes'

func (*MockRWChannelStore_GetNodes_Call) Return

func (*MockRWChannelStore_GetNodes_Call) Run

func (*MockRWChannelStore_GetNodes_Call) RunAndReturn

type MockRWChannelStore_Reload_Call

type MockRWChannelStore_Reload_Call struct {
	*mock.Call
}

MockRWChannelStore_Reload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reload'

func (*MockRWChannelStore_Reload_Call) Return

func (*MockRWChannelStore_Reload_Call) Run

func (*MockRWChannelStore_Reload_Call) RunAndReturn

type MockRWChannelStore_Update_Call

type MockRWChannelStore_Update_Call struct {
	*mock.Call
}

MockRWChannelStore_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'

func (*MockRWChannelStore_Update_Call) Return

func (*MockRWChannelStore_Update_Call) Run

func (*MockRWChannelStore_Update_Call) RunAndReturn

type MockScheduler

type MockScheduler struct {
	mock.Mock
}

MockScheduler is an autogenerated mock type for the Scheduler type

func NewMockScheduler

func NewMockScheduler(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockScheduler

NewMockScheduler creates a new instance of MockScheduler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockScheduler) EXPECT

func (_m *MockScheduler) EXPECT() *MockScheduler_Expecter

func (*MockScheduler) Finish

func (_m *MockScheduler) Finish(nodeID int64, plan *datapb.CompactionPlan)

Finish provides a mock function with given fields: nodeID, plan

func (*MockScheduler) GetTaskCount

func (_m *MockScheduler) GetTaskCount() int

GetTaskCount provides a mock function with given fields:

func (*MockScheduler) LogStatus

func (_m *MockScheduler) LogStatus()

LogStatus provides a mock function with given fields:

func (*MockScheduler) Schedule

func (_m *MockScheduler) Schedule() []*compactionTask

Schedule provides a mock function with given fields:

func (*MockScheduler) Submit

func (_m *MockScheduler) Submit(t ...*compactionTask)

Submit provides a mock function with given fields: t

type MockScheduler_Expecter

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

func (*MockScheduler_Expecter) Finish

func (_e *MockScheduler_Expecter) Finish(nodeID interface{}, plan interface{}) *MockScheduler_Finish_Call

Finish is a helper method to define mock.On call

  • nodeID int64
  • plan *datapb.CompactionPlan

func (*MockScheduler_Expecter) GetTaskCount

GetTaskCount is a helper method to define mock.On call

func (*MockScheduler_Expecter) LogStatus

LogStatus is a helper method to define mock.On call

func (*MockScheduler_Expecter) Schedule

Schedule is a helper method to define mock.On call

func (*MockScheduler_Expecter) Submit

func (_e *MockScheduler_Expecter) Submit(t ...interface{}) *MockScheduler_Submit_Call

Submit is a helper method to define mock.On call

  • t ...*compactionTask

type MockScheduler_Finish_Call

type MockScheduler_Finish_Call struct {
	*mock.Call
}

MockScheduler_Finish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Finish'

func (*MockScheduler_Finish_Call) Return

func (*MockScheduler_Finish_Call) Run

func (*MockScheduler_Finish_Call) RunAndReturn

type MockScheduler_GetTaskCount_Call

type MockScheduler_GetTaskCount_Call struct {
	*mock.Call
}

MockScheduler_GetTaskCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTaskCount'

func (*MockScheduler_GetTaskCount_Call) Return

func (*MockScheduler_GetTaskCount_Call) Run

func (*MockScheduler_GetTaskCount_Call) RunAndReturn

type MockScheduler_LogStatus_Call

type MockScheduler_LogStatus_Call struct {
	*mock.Call
}

MockScheduler_LogStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogStatus'

func (*MockScheduler_LogStatus_Call) Return

func (*MockScheduler_LogStatus_Call) Run

func (*MockScheduler_LogStatus_Call) RunAndReturn

func (_c *MockScheduler_LogStatus_Call) RunAndReturn(run func()) *MockScheduler_LogStatus_Call

type MockScheduler_Schedule_Call

type MockScheduler_Schedule_Call struct {
	*mock.Call
}

MockScheduler_Schedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Schedule'

func (*MockScheduler_Schedule_Call) Return

func (_c *MockScheduler_Schedule_Call) Return(_a0 []*compactionTask) *MockScheduler_Schedule_Call

func (*MockScheduler_Schedule_Call) Run

func (*MockScheduler_Schedule_Call) RunAndReturn

func (_c *MockScheduler_Schedule_Call) RunAndReturn(run func() []*compactionTask) *MockScheduler_Schedule_Call

type MockScheduler_Submit_Call

type MockScheduler_Submit_Call struct {
	*mock.Call
}

MockScheduler_Submit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Submit'

func (*MockScheduler_Submit_Call) Return

func (*MockScheduler_Submit_Call) Run

func (_c *MockScheduler_Submit_Call) Run(run func(t ...*compactionTask)) *MockScheduler_Submit_Call

func (*MockScheduler_Submit_Call) RunAndReturn

func (_c *MockScheduler_Submit_Call) RunAndReturn(run func(...*compactionTask)) *MockScheduler_Submit_Call

type MockSessionManager

type MockSessionManager struct {
	mock.Mock
}

MockSessionManager is an autogenerated mock type for the SessionManager type

func NewMockSessionManager

func NewMockSessionManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSessionManager

NewMockSessionManager creates a new instance of MockSessionManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockSessionManager) AddSession

func (_m *MockSessionManager) AddSession(node *NodeInfo)

AddSession provides a mock function with given fields: node

func (*MockSessionManager) CheckChannelOperationProgress

func (_m *MockSessionManager) CheckChannelOperationProgress(ctx context.Context, nodeID int64, info *datapb.ChannelWatchInfo) (*datapb.ChannelOperationProgressResponse, error)

CheckChannelOperationProgress provides a mock function with given fields: ctx, nodeID, info

func (*MockSessionManager) CheckHealth

func (_m *MockSessionManager) CheckHealth(ctx context.Context) error

CheckHealth provides a mock function with given fields: ctx

func (*MockSessionManager) Close

func (_m *MockSessionManager) Close()

Close provides a mock function with given fields:

func (*MockSessionManager) Compaction

func (_m *MockSessionManager) Compaction(ctx context.Context, nodeID int64, plan *datapb.CompactionPlan) error

Compaction provides a mock function with given fields: ctx, nodeID, plan

func (*MockSessionManager) DeleteSession

func (_m *MockSessionManager) DeleteSession(node *NodeInfo)

DeleteSession provides a mock function with given fields: node

func (*MockSessionManager) DropImport

func (_m *MockSessionManager) DropImport(nodeID int64, in *datapb.DropImportRequest) error

DropImport provides a mock function with given fields: nodeID, in

func (*MockSessionManager) EXPECT

func (*MockSessionManager) Flush

func (_m *MockSessionManager) Flush(ctx context.Context, nodeID int64, req *datapb.FlushSegmentsRequest)

Flush provides a mock function with given fields: ctx, nodeID, req

func (*MockSessionManager) FlushChannels

func (_m *MockSessionManager) FlushChannels(ctx context.Context, nodeID int64, req *datapb.FlushChannelsRequest) error

FlushChannels provides a mock function with given fields: ctx, nodeID, req

func (*MockSessionManager) GetCompactionPlansResults

func (_m *MockSessionManager) GetCompactionPlansResults() (map[int64]*typeutil.Pair[int64, *datapb.CompactionPlanResult], error)

GetCompactionPlansResults provides a mock function with given fields:

func (*MockSessionManager) GetSessionIDs

func (_m *MockSessionManager) GetSessionIDs() []int64

GetSessionIDs provides a mock function with given fields:

func (*MockSessionManager) GetSessions

func (_m *MockSessionManager) GetSessions() []*Session

GetSessions provides a mock function with given fields:

func (*MockSessionManager) ImportV2

func (_m *MockSessionManager) ImportV2(nodeID int64, in *datapb.ImportRequest) error

ImportV2 provides a mock function with given fields: nodeID, in

func (*MockSessionManager) NotifyChannelOperation

func (_m *MockSessionManager) NotifyChannelOperation(ctx context.Context, nodeID int64, req *datapb.ChannelOperationsRequest) error

NotifyChannelOperation provides a mock function with given fields: ctx, nodeID, req

func (*MockSessionManager) PreImport

func (_m *MockSessionManager) PreImport(nodeID int64, in *datapb.PreImportRequest) error

PreImport provides a mock function with given fields: nodeID, in

func (*MockSessionManager) QueryImport

QueryImport provides a mock function with given fields: nodeID, in

func (*MockSessionManager) QueryPreImport

QueryPreImport provides a mock function with given fields: nodeID, in

func (*MockSessionManager) SyncSegments

func (_m *MockSessionManager) SyncSegments(nodeID int64, req *datapb.SyncSegmentsRequest) error

SyncSegments provides a mock function with given fields: nodeID, req

type MockSessionManager_AddSession_Call

type MockSessionManager_AddSession_Call struct {
	*mock.Call
}

MockSessionManager_AddSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddSession'

func (*MockSessionManager_AddSession_Call) Return

func (*MockSessionManager_AddSession_Call) Run

func (*MockSessionManager_AddSession_Call) RunAndReturn

type MockSessionManager_CheckChannelOperationProgress_Call

type MockSessionManager_CheckChannelOperationProgress_Call struct {
	*mock.Call
}

MockSessionManager_CheckChannelOperationProgress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckChannelOperationProgress'

func (*MockSessionManager_CheckChannelOperationProgress_Call) Run

type MockSessionManager_CheckHealth_Call

type MockSessionManager_CheckHealth_Call struct {
	*mock.Call
}

MockSessionManager_CheckHealth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckHealth'

func (*MockSessionManager_CheckHealth_Call) Return

func (*MockSessionManager_CheckHealth_Call) Run

func (*MockSessionManager_CheckHealth_Call) RunAndReturn

type MockSessionManager_Close_Call

type MockSessionManager_Close_Call struct {
	*mock.Call
}

MockSessionManager_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*MockSessionManager_Close_Call) Return

func (*MockSessionManager_Close_Call) Run

func (*MockSessionManager_Close_Call) RunAndReturn

func (_c *MockSessionManager_Close_Call) RunAndReturn(run func()) *MockSessionManager_Close_Call

type MockSessionManager_Compaction_Call

type MockSessionManager_Compaction_Call struct {
	*mock.Call
}

MockSessionManager_Compaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Compaction'

func (*MockSessionManager_Compaction_Call) Return

func (*MockSessionManager_Compaction_Call) Run

func (*MockSessionManager_Compaction_Call) RunAndReturn

type MockSessionManager_DeleteSession_Call

type MockSessionManager_DeleteSession_Call struct {
	*mock.Call
}

MockSessionManager_DeleteSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSession'

func (*MockSessionManager_DeleteSession_Call) Return

func (*MockSessionManager_DeleteSession_Call) Run

func (*MockSessionManager_DeleteSession_Call) RunAndReturn

type MockSessionManager_DropImport_Call

type MockSessionManager_DropImport_Call struct {
	*mock.Call
}

MockSessionManager_DropImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropImport'

func (*MockSessionManager_DropImport_Call) Return

func (*MockSessionManager_DropImport_Call) Run

func (*MockSessionManager_DropImport_Call) RunAndReturn

type MockSessionManager_Expecter

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

func (*MockSessionManager_Expecter) AddSession

func (_e *MockSessionManager_Expecter) AddSession(node interface{}) *MockSessionManager_AddSession_Call

AddSession is a helper method to define mock.On call

  • node *NodeInfo

func (*MockSessionManager_Expecter) CheckChannelOperationProgress

func (_e *MockSessionManager_Expecter) CheckChannelOperationProgress(ctx interface{}, nodeID interface{}, info interface{}) *MockSessionManager_CheckChannelOperationProgress_Call

CheckChannelOperationProgress is a helper method to define mock.On call

  • ctx context.Context
  • nodeID int64
  • info *datapb.ChannelWatchInfo

func (*MockSessionManager_Expecter) CheckHealth

func (_e *MockSessionManager_Expecter) CheckHealth(ctx interface{}) *MockSessionManager_CheckHealth_Call

CheckHealth is a helper method to define mock.On call

  • ctx context.Context

func (*MockSessionManager_Expecter) Close

Close is a helper method to define mock.On call

func (*MockSessionManager_Expecter) Compaction

func (_e *MockSessionManager_Expecter) Compaction(ctx interface{}, nodeID interface{}, plan interface{}) *MockSessionManager_Compaction_Call

Compaction is a helper method to define mock.On call

  • ctx context.Context
  • nodeID int64
  • plan *datapb.CompactionPlan

func (*MockSessionManager_Expecter) DeleteSession

func (_e *MockSessionManager_Expecter) DeleteSession(node interface{}) *MockSessionManager_DeleteSession_Call

DeleteSession is a helper method to define mock.On call

  • node *NodeInfo

func (*MockSessionManager_Expecter) DropImport

func (_e *MockSessionManager_Expecter) DropImport(nodeID interface{}, in interface{}) *MockSessionManager_DropImport_Call

DropImport is a helper method to define mock.On call

  • nodeID int64
  • in *datapb.DropImportRequest

func (*MockSessionManager_Expecter) Flush

func (_e *MockSessionManager_Expecter) Flush(ctx interface{}, nodeID interface{}, req interface{}) *MockSessionManager_Flush_Call

Flush is a helper method to define mock.On call

  • ctx context.Context
  • nodeID int64
  • req *datapb.FlushSegmentsRequest

func (*MockSessionManager_Expecter) FlushChannels

func (_e *MockSessionManager_Expecter) FlushChannels(ctx interface{}, nodeID interface{}, req interface{}) *MockSessionManager_FlushChannels_Call

FlushChannels is a helper method to define mock.On call

  • ctx context.Context
  • nodeID int64
  • req *datapb.FlushChannelsRequest

func (*MockSessionManager_Expecter) GetCompactionPlansResults

GetCompactionPlansResults is a helper method to define mock.On call

func (*MockSessionManager_Expecter) GetSessionIDs

GetSessionIDs is a helper method to define mock.On call

func (*MockSessionManager_Expecter) GetSessions

GetSessions is a helper method to define mock.On call

func (*MockSessionManager_Expecter) ImportV2

func (_e *MockSessionManager_Expecter) ImportV2(nodeID interface{}, in interface{}) *MockSessionManager_ImportV2_Call

ImportV2 is a helper method to define mock.On call

  • nodeID int64
  • in *datapb.ImportRequest

func (*MockSessionManager_Expecter) NotifyChannelOperation

func (_e *MockSessionManager_Expecter) NotifyChannelOperation(ctx interface{}, nodeID interface{}, req interface{}) *MockSessionManager_NotifyChannelOperation_Call

NotifyChannelOperation is a helper method to define mock.On call

  • ctx context.Context
  • nodeID int64
  • req *datapb.ChannelOperationsRequest

func (*MockSessionManager_Expecter) PreImport

func (_e *MockSessionManager_Expecter) PreImport(nodeID interface{}, in interface{}) *MockSessionManager_PreImport_Call

PreImport is a helper method to define mock.On call

  • nodeID int64
  • in *datapb.PreImportRequest

func (*MockSessionManager_Expecter) QueryImport

func (_e *MockSessionManager_Expecter) QueryImport(nodeID interface{}, in interface{}) *MockSessionManager_QueryImport_Call

QueryImport is a helper method to define mock.On call

  • nodeID int64
  • in *datapb.QueryImportRequest

func (*MockSessionManager_Expecter) QueryPreImport

func (_e *MockSessionManager_Expecter) QueryPreImport(nodeID interface{}, in interface{}) *MockSessionManager_QueryPreImport_Call

QueryPreImport is a helper method to define mock.On call

  • nodeID int64
  • in *datapb.QueryPreImportRequest

func (*MockSessionManager_Expecter) SyncSegments

func (_e *MockSessionManager_Expecter) SyncSegments(nodeID interface{}, req interface{}) *MockSessionManager_SyncSegments_Call

SyncSegments is a helper method to define mock.On call

  • nodeID int64
  • req *datapb.SyncSegmentsRequest

type MockSessionManager_FlushChannels_Call

type MockSessionManager_FlushChannels_Call struct {
	*mock.Call
}

MockSessionManager_FlushChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlushChannels'

func (*MockSessionManager_FlushChannels_Call) Return

func (*MockSessionManager_FlushChannels_Call) Run

func (*MockSessionManager_FlushChannels_Call) RunAndReturn

type MockSessionManager_Flush_Call

type MockSessionManager_Flush_Call struct {
	*mock.Call
}

MockSessionManager_Flush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Flush'

func (*MockSessionManager_Flush_Call) Return

func (*MockSessionManager_Flush_Call) Run

func (*MockSessionManager_Flush_Call) RunAndReturn

type MockSessionManager_GetCompactionPlansResults_Call

type MockSessionManager_GetCompactionPlansResults_Call struct {
	*mock.Call
}

MockSessionManager_GetCompactionPlansResults_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCompactionPlansResults'

func (*MockSessionManager_GetCompactionPlansResults_Call) Return

func (*MockSessionManager_GetCompactionPlansResults_Call) Run

func (*MockSessionManager_GetCompactionPlansResults_Call) RunAndReturn

type MockSessionManager_GetSessionIDs_Call

type MockSessionManager_GetSessionIDs_Call struct {
	*mock.Call
}

MockSessionManager_GetSessionIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSessionIDs'

func (*MockSessionManager_GetSessionIDs_Call) Return

func (*MockSessionManager_GetSessionIDs_Call) Run

func (*MockSessionManager_GetSessionIDs_Call) RunAndReturn

type MockSessionManager_GetSessions_Call

type MockSessionManager_GetSessions_Call struct {
	*mock.Call
}

MockSessionManager_GetSessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSessions'

func (*MockSessionManager_GetSessions_Call) Return

func (*MockSessionManager_GetSessions_Call) Run

func (*MockSessionManager_GetSessions_Call) RunAndReturn

type MockSessionManager_ImportV2_Call

type MockSessionManager_ImportV2_Call struct {
	*mock.Call
}

MockSessionManager_ImportV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ImportV2'

func (*MockSessionManager_ImportV2_Call) Return

func (*MockSessionManager_ImportV2_Call) Run

func (*MockSessionManager_ImportV2_Call) RunAndReturn

type MockSessionManager_NotifyChannelOperation_Call

type MockSessionManager_NotifyChannelOperation_Call struct {
	*mock.Call
}

MockSessionManager_NotifyChannelOperation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NotifyChannelOperation'

func (*MockSessionManager_NotifyChannelOperation_Call) Return

func (*MockSessionManager_NotifyChannelOperation_Call) Run

type MockSessionManager_PreImport_Call

type MockSessionManager_PreImport_Call struct {
	*mock.Call
}

MockSessionManager_PreImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PreImport'

func (*MockSessionManager_PreImport_Call) Return

func (*MockSessionManager_PreImport_Call) Run

func (*MockSessionManager_PreImport_Call) RunAndReturn

type MockSessionManager_QueryImport_Call

type MockSessionManager_QueryImport_Call struct {
	*mock.Call
}

MockSessionManager_QueryImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryImport'

func (*MockSessionManager_QueryImport_Call) Return

func (*MockSessionManager_QueryImport_Call) Run

func (*MockSessionManager_QueryImport_Call) RunAndReturn

type MockSessionManager_QueryPreImport_Call

type MockSessionManager_QueryPreImport_Call struct {
	*mock.Call
}

MockSessionManager_QueryPreImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryPreImport'

func (*MockSessionManager_QueryPreImport_Call) Return

func (*MockSessionManager_QueryPreImport_Call) Run

type MockSessionManager_SyncSegments_Call

type MockSessionManager_SyncSegments_Call struct {
	*mock.Call
}

MockSessionManager_SyncSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncSegments'

func (*MockSessionManager_SyncSegments_Call) Return

func (*MockSessionManager_SyncSegments_Call) Run

func (*MockSessionManager_SyncSegments_Call) RunAndReturn

type MockTriggerManager

type MockTriggerManager struct {
	mock.Mock
}

MockTriggerManager is an autogenerated mock type for the TriggerManager type

func NewMockTriggerManager

func NewMockTriggerManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTriggerManager

NewMockTriggerManager creates a new instance of MockTriggerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockTriggerManager) EXPECT

func (*MockTriggerManager) Notify

func (_m *MockTriggerManager) Notify(_a0 int64, _a1 CompactionTriggerType, _a2 []CompactionView)

Notify provides a mock function with given fields: _a0, _a1, _a2

type MockTriggerManager_Expecter

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

func (*MockTriggerManager_Expecter) Notify

func (_e *MockTriggerManager_Expecter) Notify(_a0 interface{}, _a1 interface{}, _a2 interface{}) *MockTriggerManager_Notify_Call

Notify is a helper method to define mock.On call

  • _a0 int64
  • _a1 CompactionTriggerType
  • _a2 []CompactionView

type MockTriggerManager_Notify_Call

type MockTriggerManager_Notify_Call struct {
	*mock.Call
}

MockTriggerManager_Notify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Notify'

func (*MockTriggerManager_Notify_Call) Return

func (*MockTriggerManager_Notify_Call) Run

func (*MockTriggerManager_Notify_Call) RunAndReturn

type MockVersionManager

type MockVersionManager struct {
	mock.Mock
}

MockVersionManager is an autogenerated mock type for the IndexEngineVersionManager type

func NewMockVersionManager

func NewMockVersionManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockVersionManager

NewMockVersionManager creates a new instance of MockVersionManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockVersionManager) AddNode

func (_m *MockVersionManager) AddNode(session *sessionutil.Session)

AddNode provides a mock function with given fields: session

func (*MockVersionManager) EXPECT

func (*MockVersionManager) GetCurrentIndexEngineVersion

func (_m *MockVersionManager) GetCurrentIndexEngineVersion() int32

GetCurrentIndexEngineVersion provides a mock function with given fields:

func (*MockVersionManager) GetMinimalIndexEngineVersion

func (_m *MockVersionManager) GetMinimalIndexEngineVersion() int32

GetMinimalIndexEngineVersion provides a mock function with given fields:

func (*MockVersionManager) RemoveNode

func (_m *MockVersionManager) RemoveNode(session *sessionutil.Session)

RemoveNode provides a mock function with given fields: session

func (*MockVersionManager) Startup

func (_m *MockVersionManager) Startup(sessions map[string]*sessionutil.Session)

Startup provides a mock function with given fields: sessions

func (*MockVersionManager) Update

func (_m *MockVersionManager) Update(session *sessionutil.Session)

Update provides a mock function with given fields: session

type MockVersionManager_AddNode_Call

type MockVersionManager_AddNode_Call struct {
	*mock.Call
}

MockVersionManager_AddNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddNode'

func (*MockVersionManager_AddNode_Call) Return

func (*MockVersionManager_AddNode_Call) Run

func (*MockVersionManager_AddNode_Call) RunAndReturn

type MockVersionManager_Expecter

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

func (*MockVersionManager_Expecter) AddNode

func (_e *MockVersionManager_Expecter) AddNode(session interface{}) *MockVersionManager_AddNode_Call

AddNode is a helper method to define mock.On call

  • session *sessionutil.Session

func (*MockVersionManager_Expecter) GetCurrentIndexEngineVersion

GetCurrentIndexEngineVersion is a helper method to define mock.On call

func (*MockVersionManager_Expecter) GetMinimalIndexEngineVersion

GetMinimalIndexEngineVersion is a helper method to define mock.On call

func (*MockVersionManager_Expecter) RemoveNode

func (_e *MockVersionManager_Expecter) RemoveNode(session interface{}) *MockVersionManager_RemoveNode_Call

RemoveNode is a helper method to define mock.On call

  • session *sessionutil.Session

func (*MockVersionManager_Expecter) Startup

func (_e *MockVersionManager_Expecter) Startup(sessions interface{}) *MockVersionManager_Startup_Call

Startup is a helper method to define mock.On call

  • sessions map[string]*sessionutil.Session

func (*MockVersionManager_Expecter) Update

func (_e *MockVersionManager_Expecter) Update(session interface{}) *MockVersionManager_Update_Call

Update is a helper method to define mock.On call

  • session *sessionutil.Session

type MockVersionManager_GetCurrentIndexEngineVersion_Call

type MockVersionManager_GetCurrentIndexEngineVersion_Call struct {
	*mock.Call
}

MockVersionManager_GetCurrentIndexEngineVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentIndexEngineVersion'

func (*MockVersionManager_GetCurrentIndexEngineVersion_Call) Return

func (*MockVersionManager_GetCurrentIndexEngineVersion_Call) Run

func (*MockVersionManager_GetCurrentIndexEngineVersion_Call) RunAndReturn

type MockVersionManager_GetMinimalIndexEngineVersion_Call

type MockVersionManager_GetMinimalIndexEngineVersion_Call struct {
	*mock.Call
}

MockVersionManager_GetMinimalIndexEngineVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMinimalIndexEngineVersion'

func (*MockVersionManager_GetMinimalIndexEngineVersion_Call) Return

func (*MockVersionManager_GetMinimalIndexEngineVersion_Call) Run

func (*MockVersionManager_GetMinimalIndexEngineVersion_Call) RunAndReturn

type MockVersionManager_RemoveNode_Call

type MockVersionManager_RemoveNode_Call struct {
	*mock.Call
}

MockVersionManager_RemoveNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveNode'

func (*MockVersionManager_RemoveNode_Call) Return

func (*MockVersionManager_RemoveNode_Call) Run

func (*MockVersionManager_RemoveNode_Call) RunAndReturn

type MockVersionManager_Startup_Call

type MockVersionManager_Startup_Call struct {
	*mock.Call
}

MockVersionManager_Startup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Startup'

func (*MockVersionManager_Startup_Call) Return

func (*MockVersionManager_Startup_Call) Run

func (*MockVersionManager_Startup_Call) RunAndReturn

type MockVersionManager_Update_Call

type MockVersionManager_Update_Call struct {
	*mock.Call
}

MockVersionManager_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'

func (*MockVersionManager_Update_Call) Return

func (*MockVersionManager_Update_Call) Run

func (*MockVersionManager_Update_Call) RunAndReturn

type NMockHandler

type NMockHandler struct {
	mock.Mock
}

NMockHandler is an autogenerated mock type for the Handler type

func NewNMockHandler

func NewNMockHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *NMockHandler

NewNMockHandler creates a new instance of NMockHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*NMockHandler) CheckShouldDropChannel

func (_m *NMockHandler) CheckShouldDropChannel(ch string) bool

CheckShouldDropChannel provides a mock function with given fields: ch

func (*NMockHandler) EXPECT

func (_m *NMockHandler) EXPECT() *NMockHandler_Expecter

func (*NMockHandler) FinishDropChannel

func (_m *NMockHandler) FinishDropChannel(ch string, collectionID int64) error

FinishDropChannel provides a mock function with given fields: ch, collectionID

func (*NMockHandler) GetCollection

func (_m *NMockHandler) GetCollection(ctx context.Context, collectionID int64) (*collectionInfo, error)

GetCollection provides a mock function with given fields: ctx, collectionID

func (*NMockHandler) GetDataVChanPositions

func (_m *NMockHandler) GetDataVChanPositions(ch RWChannel, partitionID int64) *datapb.VchannelInfo

GetDataVChanPositions provides a mock function with given fields: ch, partitionID

func (*NMockHandler) GetQueryVChanPositions

func (_m *NMockHandler) GetQueryVChanPositions(ch RWChannel, partitionIDs ...int64) *datapb.VchannelInfo

GetQueryVChanPositions provides a mock function with given fields: ch, partitionIDs

type NMockHandler_CheckShouldDropChannel_Call

type NMockHandler_CheckShouldDropChannel_Call struct {
	*mock.Call
}

NMockHandler_CheckShouldDropChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckShouldDropChannel'

func (*NMockHandler_CheckShouldDropChannel_Call) Return

func (*NMockHandler_CheckShouldDropChannel_Call) Run

func (*NMockHandler_CheckShouldDropChannel_Call) RunAndReturn

type NMockHandler_Expecter

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

func (*NMockHandler_Expecter) CheckShouldDropChannel

func (_e *NMockHandler_Expecter) CheckShouldDropChannel(ch interface{}) *NMockHandler_CheckShouldDropChannel_Call

CheckShouldDropChannel is a helper method to define mock.On call

  • ch string

func (*NMockHandler_Expecter) FinishDropChannel

func (_e *NMockHandler_Expecter) FinishDropChannel(ch interface{}, collectionID interface{}) *NMockHandler_FinishDropChannel_Call

FinishDropChannel is a helper method to define mock.On call

  • ch string
  • collectionID int64

func (*NMockHandler_Expecter) GetCollection

func (_e *NMockHandler_Expecter) GetCollection(ctx interface{}, collectionID interface{}) *NMockHandler_GetCollection_Call

GetCollection is a helper method to define mock.On call

  • ctx context.Context
  • collectionID int64

func (*NMockHandler_Expecter) GetDataVChanPositions

func (_e *NMockHandler_Expecter) GetDataVChanPositions(ch interface{}, partitionID interface{}) *NMockHandler_GetDataVChanPositions_Call

GetDataVChanPositions is a helper method to define mock.On call

  • ch RWChannel
  • partitionID int64

func (*NMockHandler_Expecter) GetQueryVChanPositions

func (_e *NMockHandler_Expecter) GetQueryVChanPositions(ch interface{}, partitionIDs ...interface{}) *NMockHandler_GetQueryVChanPositions_Call

GetQueryVChanPositions is a helper method to define mock.On call

  • ch RWChannel
  • partitionIDs ...int64

type NMockHandler_FinishDropChannel_Call

type NMockHandler_FinishDropChannel_Call struct {
	*mock.Call
}

NMockHandler_FinishDropChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinishDropChannel'

func (*NMockHandler_FinishDropChannel_Call) Return

func (*NMockHandler_FinishDropChannel_Call) Run

func (*NMockHandler_FinishDropChannel_Call) RunAndReturn

type NMockHandler_GetCollection_Call

type NMockHandler_GetCollection_Call struct {
	*mock.Call
}

NMockHandler_GetCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollection'

func (*NMockHandler_GetCollection_Call) Return

func (_c *NMockHandler_GetCollection_Call) Return(_a0 *collectionInfo, _a1 error) *NMockHandler_GetCollection_Call

func (*NMockHandler_GetCollection_Call) Run

func (*NMockHandler_GetCollection_Call) RunAndReturn

func (_c *NMockHandler_GetCollection_Call) RunAndReturn(run func(context.Context, int64) (*collectionInfo, error)) *NMockHandler_GetCollection_Call

type NMockHandler_GetDataVChanPositions_Call

type NMockHandler_GetDataVChanPositions_Call struct {
	*mock.Call
}

NMockHandler_GetDataVChanPositions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDataVChanPositions'

func (*NMockHandler_GetDataVChanPositions_Call) Return

func (*NMockHandler_GetDataVChanPositions_Call) Run

func (*NMockHandler_GetDataVChanPositions_Call) RunAndReturn

type NMockHandler_GetQueryVChanPositions_Call

type NMockHandler_GetQueryVChanPositions_Call struct {
	*mock.Call
}

NMockHandler_GetQueryVChanPositions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQueryVChanPositions'

func (*NMockHandler_GetQueryVChanPositions_Call) Return

func (*NMockHandler_GetQueryVChanPositions_Call) Run

func (*NMockHandler_GetQueryVChanPositions_Call) RunAndReturn

type NodeChannelInfo

type NodeChannelInfo struct {
	NodeID   int64
	Channels map[string]RWChannel
}

NodeChannelInfo stores the nodeID and its channels.

func BgBalanceCheck

func BgBalanceCheck(nodeChannels []*NodeChannelInfo, ts time.Time) ([]*NodeChannelInfo, error)

func EmptyBgChecker

func EmptyBgChecker(channels []*NodeChannelInfo, ts time.Time) ([]*NodeChannelInfo, error)

EmptyBgChecker does nothing

func NewNodeChannelInfo

func NewNodeChannelInfo(nodeID int64, channels ...RWChannel) *NodeChannelInfo

func (*NodeChannelInfo) AddChannel

func (info *NodeChannelInfo) AddChannel(ch RWChannel)

AddChannel appends channel info node channel list.

func (*NodeChannelInfo) RemoveChannel

func (info *NodeChannelInfo) RemoveChannel(channelName string)

RemoveChannel removes channel from Channels.

type NodeInfo

type NodeInfo struct {
	NodeID  int64
	Address string
}

NodeInfo contains node base info

type Option

type Option func(svr *Server)

Option utility function signature to set DataCoord server attributes

func WithCluster

func WithCluster(cluster Cluster) Option

WithCluster returns an `Option` setting Cluster with provided parameter

func WithDataNodeCreator

func WithDataNodeCreator(creator dataNodeCreatorFunc) Option

WithDataNodeCreator returns an `Option` setting DataNode create function

func WithRootCoordCreator

func WithRootCoordCreator(creator rootCoordCreatorFunc) Option

WithRootCoordCreator returns an `Option` setting RootCoord creator with provided parameter

func WithSegmentManager

func WithSegmentManager(manager Manager) Option

WithSegmentManager returns an Option to set SegmentManager

func WithServerHelper

func WithServerHelper(helper ServerHelper) Option

WithServerHelper returns an `Option` setting ServerHelp with provided parameter

type ROChannel

type ROChannel interface {
	String() string
	GetName() string
	GetCollectionID() UniqueID
	GetStartPositions() []*commonpb.KeyDataPair
	GetSchema() *schemapb.CollectionSchema
	GetCreateTimestamp() Timestamp
	GetWatchInfo() *datapb.ChannelWatchInfo
}

type ROChannelStore

type ROChannelStore interface {
	// GetNode returns the channel info of a specific node.
	GetNode(nodeID int64) *NodeChannelInfo
	// GetChannels returns info of all channels.
	GetChannels() []*NodeChannelInfo
	// GetNodesChannels returns the channels that are assigned to nodes.
	GetNodesChannels() []*NodeChannelInfo
	// GetBufferChannelInfo gets the unassigned channels.
	GetBufferChannelInfo() *NodeChannelInfo
	// GetNodes gets all node ids in store.
	GetNodes() []int64
	// GetNodeChannelCount
	GetNodeChannelCount(nodeID int64) int
}

ROChannelStore is a read only channel store for channels and nodes.

type RWChannel

type RWChannel interface {
	ROChannel
	UpdateWatchInfo(info *datapb.ChannelWatchInfo)
}

type RWChannelStore

type RWChannelStore interface {
	ROChannelStore
	// Reload restores the buffer channels and node-channels mapping form kv.
	Reload() error
	// Add creates a new node-channels mapping, with no channels assigned to the node.
	Add(nodeID int64)
	// Delete removes nodeID and returns its channels.
	Delete(nodeID int64) ([]RWChannel, error)
	// Update applies the operations in ChannelOpSet.
	Update(op *ChannelOpSet) error
}

RWChannelStore is the read write channel store for channels and nodes.

type ReAllocates

type ReAllocates []*NodeChannelInfo

func (ReAllocates) MarshalLogArray

func (rallocates ReAllocates) MarshalLogArray(enc zapcore.ArrayEncoder) error

type RegisterPolicy

type RegisterPolicy func(store ROChannelStore, nodeID int64) (*ChannelOpSet, *ChannelOpSet)

RegisterPolicy decides the channels mapping after registering the nodeID return bufferedUpdates and balanceUpdates

type Response

type Response interface {
	GetStatus() *commonpb.Status
}

Response response interface for verification

type Scheduler

type Scheduler interface {
	Submit(t ...*compactionTask)
	Schedule() []*compactionTask
	Finish(nodeID int64, plan *datapb.CompactionPlan)
	GetTaskCount() int
	LogStatus()
}

type SegmentInfo

type SegmentInfo struct {
	*datapb.SegmentInfo
	// contains filtered or unexported fields
}

SegmentInfo wraps datapb.SegmentInfo and patches some extra info on it

func FilterInIndexedSegments

func FilterInIndexedSegments(handler Handler, mt *meta, segments ...*SegmentInfo) []*SegmentInfo

func NewSegmentInfo

func NewSegmentInfo(info *datapb.SegmentInfo) *SegmentInfo

NewSegmentInfo create `SegmentInfo` wrapper from `datapb.SegmentInfo` assign current rows to last checkpoint and pre-allocate `allocations` slice Note that the allocation information is not preserved, the worst case scenario is to have a segment with twice size we expects

func (*SegmentInfo) Clone

func (s *SegmentInfo) Clone(opts ...SegmentInfoOption) *SegmentInfo

Clone deep clone the segment info and return a new instance

func (*SegmentInfo) ShadowClone

func (s *SegmentInfo) ShadowClone(opts ...SegmentInfoOption) *SegmentInfo

ShadowClone shadow clone the segment and return a new instance

type SegmentInfoOption

type SegmentInfoOption func(segment *SegmentInfo)

SegmentInfoOption is the option to set fields in segment info

func AddAllocation

func AddAllocation(allocation *Allocation) SegmentInfoOption

AddAllocation is the option to add allocation info for segment info

func SetAllocations

func SetAllocations(allocations []*Allocation) SegmentInfoOption

SetAllocations is the option to set allocations for segment info

func SetCurrentRows

func SetCurrentRows(rows int64) SegmentInfoOption

SetCurrentRows is the option to set current row count for segment info

func SetDmlPosition

func SetDmlPosition(pos *msgpb.MsgPosition) SegmentInfoOption

SetDmlPosition is the option to set dml position for segment info

func SetExpireTime

func SetExpireTime(expireTs Timestamp) SegmentInfoOption

SetExpireTime is the option to set expire time for segment info

func SetFlushTime

func SetFlushTime(t time.Time) SegmentInfoOption

SetFlushTime is the option to set flush time for segment info

func SetIsCompacting

func SetIsCompacting(isCompacting bool) SegmentInfoOption

SetIsCompacting is the option to set compaction state for segment info

func SetRowCount

func SetRowCount(rowCount int64) SegmentInfoOption

SetRowCount is the option to set row count for segment info

func SetStartPosition

func SetStartPosition(pos *msgpb.MsgPosition) SegmentInfoOption

SetStartPosition is the option to set start position for segment info

func SetState

func SetState(state commonpb.SegmentState) SegmentInfoOption

SetState is the option to set state for segment info

type SegmentInfoSelector

type SegmentInfoSelector func(*SegmentInfo) bool

SegmentInfoSelector is the function type to select SegmentInfo from meta

type SegmentManager

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

SegmentManager handles L1 segment related logic

func (*SegmentManager) AllocImportSegment

func (s *SegmentManager) AllocImportSegment(ctx context.Context, taskID int64, collectionID UniqueID,
	partitionID UniqueID, channelName string,
) (*SegmentInfo, error)

func (*SegmentManager) AllocSegment

func (s *SegmentManager) AllocSegment(ctx context.Context, collectionID UniqueID,
	partitionID UniqueID, channelName string, requestRows int64,
) ([]*Allocation, error)

AllocSegment allocate segment per request collcation, partication, channel and rows

func (*SegmentManager) DropSegment

func (s *SegmentManager) DropSegment(ctx context.Context, segmentID UniqueID)

DropSegment drop the segment from manager.

func (*SegmentManager) DropSegmentsOfChannel

func (s *SegmentManager) DropSegmentsOfChannel(ctx context.Context, channel string)

DropSegmentsOfChannel drops all segments in a channel

func (*SegmentManager) ExpireAllocations

func (s *SegmentManager) ExpireAllocations(channel string, ts Timestamp) error

ExpireAllocations notify segment status to expire old allocations

func (*SegmentManager) FlushImportSegments

func (s *SegmentManager) FlushImportSegments(ctx context.Context, collectionID UniqueID, segmentIDs []UniqueID) error

FlushImportSegments set importing segment state to Flushed.

func (*SegmentManager) GetFlushableSegments

func (s *SegmentManager) GetFlushableSegments(ctx context.Context, channel string, t Timestamp) ([]UniqueID, error)

GetFlushableSegments get segment ids with Sealed State and flushable (meets flushPolicy)

func (*SegmentManager) SealAllSegments

func (s *SegmentManager) SealAllSegments(ctx context.Context, collectionID UniqueID, segIDs []UniqueID) ([]UniqueID, error)

SealAllSegments seals all segments of collection with collectionID and return sealed segments

type SegmentOperator

type SegmentOperator func(segment *SegmentInfo) bool

SegmentOperator is function type to update segment info.

func SetMaxRowCount

func SetMaxRowCount(maxRow int64) SegmentOperator

type SegmentView

type SegmentView struct {
	ID UniqueID

	State commonpb.SegmentState
	Level datapb.SegmentLevel

	// size
	Size       float64
	ExpireSize float64
	DeltaSize  float64

	// file numbers
	BinlogCount   int
	StatslogCount int
	DeltalogCount int
	// contains filtered or unexported fields
}

func GetViewsByInfo

func GetViewsByInfo(segments ...*SegmentInfo) []*SegmentView

func (*SegmentView) Clone

func (s *SegmentView) Clone() *SegmentView

func (*SegmentView) Equal

func (v *SegmentView) Equal(other *SegmentView) bool

func (*SegmentView) LevelZeroString

func (v *SegmentView) LevelZeroString() string

func (*SegmentView) String

func (v *SegmentView) String() string

type SegmentViewSelector

type SegmentViewSelector func(view *SegmentView) bool

type SegmentsInfo

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

SegmentsInfo wraps a map, which maintains ID to SegmentInfo relation

func NewSegmentsInfo

func NewSegmentsInfo() *SegmentsInfo

NewSegmentsInfo creates a `SegmentsInfo` instance, which makes sure internal map is initialized note that no mutex is wrapped so external concurrent control is needed

func (*SegmentsInfo) AddAllocation

func (s *SegmentsInfo) AddAllocation(segmentID UniqueID, allocation *Allocation)

AddAllocation adds a new allocation to specified segment if the segment is not found, do nothing uses `Clone` since internal SegmentInfo's LastExpireTime is changed

func (*SegmentsInfo) DropSegment

func (s *SegmentsInfo) DropSegment(segmentID UniqueID)

DropSegment deletes provided segmentID no extra method is taken when segmentID not exists

func (*SegmentsInfo) GetCompactionTo

func (s *SegmentsInfo) GetCompactionTo(fromSegmentID int64) (*SegmentInfo, bool)

GetCompactionTo returns the segment that the provided segment is compacted to. Return (nil, false) if given segmentID can not found in the meta. Return (nil, true) if given segmentID can be found not no compaction to. Return (notnil, true) if given segmentID can be found and has compaction to.

func (*SegmentsInfo) GetSegment

func (s *SegmentsInfo) GetSegment(segmentID UniqueID) *SegmentInfo

GetSegment returns SegmentInfo the logPath in meta is empty

func (*SegmentsInfo) GetSegments

func (s *SegmentsInfo) GetSegments() []*SegmentInfo

GetSegments iterates internal map and returns all SegmentInfo in a slice no deep copy applied the logPath in meta is empty

func (*SegmentsInfo) GetSegmentsBySelector

func (s *SegmentsInfo) GetSegmentsBySelector(selector SegmentInfoSelector) []*SegmentInfo

func (*SegmentsInfo) SetAllocations

func (s *SegmentsInfo) SetAllocations(segmentID UniqueID, allocations []*Allocation)

SetAllocations sets allocations for segment with specified id if the segment id is not found, do nothing uses `ShadowClone` since internal SegmentInfo is not changed

func (*SegmentsInfo) SetCurrentRows

func (s *SegmentsInfo) SetCurrentRows(segmentID UniqueID, rows int64)

SetCurrentRows sets rows count for segment if the segment is not found, do nothing uses `ShadowClone` since internal SegmentInfo is not changed

func (*SegmentsInfo) SetDmlPosition

func (s *SegmentsInfo) SetDmlPosition(segmentID UniqueID, pos *msgpb.MsgPosition)

SetDmlPosition sets DmlPosition info (checkpoint for recovery) for SegmentInfo with provided segmentID if SegmentInfo not found, do nothing

func (*SegmentsInfo) SetFlushTime

func (s *SegmentsInfo) SetFlushTime(segmentID UniqueID, t time.Time)

SetFlushTime sets flush time for segment if the segment is not found, do nothing uses `ShadowClone` since internal SegmentInfo is not changed

func (*SegmentsInfo) SetIsCompacting

func (s *SegmentsInfo) SetIsCompacting(segmentID UniqueID, isCompacting bool)

SetIsCompacting sets compaction status for segment

func (*SegmentsInfo) SetRowCount

func (s *SegmentsInfo) SetRowCount(segmentID UniqueID, rowCount int64)

SetRowCount sets rowCount info for SegmentInfo with provided segmentID if SegmentInfo not found, do nothing

func (*SegmentsInfo) SetSegment

func (s *SegmentsInfo) SetSegment(segmentID UniqueID, segment *SegmentInfo)

SetSegment sets SegmentInfo with segmentID, perform overwrite if already exists set the logPath of segement in meta empty, to save space if segment has logPath, make it empty

func (*SegmentsInfo) SetStartPosition

func (s *SegmentsInfo) SetStartPosition(segmentID UniqueID, pos *msgpb.MsgPosition)

SetStartPosition sets StartPosition info (recovery info when no checkout point found) for SegmentInfo with provided segmentID if SegmentInfo not found, do nothing

func (*SegmentsInfo) SetState

func (s *SegmentsInfo) SetState(segmentID UniqueID, state commonpb.SegmentState)

SetState sets Segment State info for SegmentInfo with provided segmentID if SegmentInfo not found, do nothing

type Server

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

Server implements `types.DataCoord` handles Data Coordinator related jobs

func CreateServer

func CreateServer(ctx context.Context, factory dependency.Factory, opts ...Option) *Server

CreateServer creates a `Server` instance

func (*Server) AlterIndex

func (s *Server) AlterIndex(ctx context.Context, req *indexpb.AlterIndexRequest) (*commonpb.Status, error)

func (*Server) AssignSegmentID

AssignSegmentID applies for segment ids and make allocation for records.

func (*Server) BroadcastAlteredCollection

func (s *Server) BroadcastAlteredCollection(ctx context.Context, req *datapb.AlterCollectionRequest) (*commonpb.Status, error)

func (*Server) CheckHealth

func (*Server) CleanMeta

func (s *Server) CleanMeta() error

CleanMeta only for test

func (*Server) CreateIndex

func (s *Server) CreateIndex(ctx context.Context, req *indexpb.CreateIndexRequest) (*commonpb.Status, error)

CreateIndex create an index on collection. Index building is asynchronous, so when an index building request comes, an IndexID is assigned to the task and will get all flushed segments from DataCoord and record tasks with these segments. The background process indexBuilder will find this task and assign it to IndexNode for execution.

func (*Server) DescribeIndex

DescribeIndex describe the index info of the collection.

func (*Server) DropIndex

func (s *Server) DropIndex(ctx context.Context, req *indexpb.DropIndexRequest) (*commonpb.Status, error)

DropIndex deletes indexes based on IndexName. One IndexName corresponds to the index of an entire column. A column is divided into many segments, and each segment corresponds to an IndexBuildID. DataCoord uses IndexBuildID to record index tasks.

func (*Server) DropVirtualChannel

DropVirtualChannel notifies vchannel dropped And contains the remaining data log & checkpoint to update

func (*Server) Flush

Flush notify segment to flush this api only guarantees all the segments requested is sealed these segments will be flushed only after the Flush policy is fulfilled

func (*Server) GcConfirm

func (s *Server) GcConfirm(ctx context.Context, request *datapb.GcConfirmRequest) (*datapb.GcConfirmResponse, error)

func (*Server) GcControl

func (s *Server) GcControl(ctx context.Context, request *datapb.GcControlRequest) (*commonpb.Status, error)

func (*Server) GetCollectionStatistics

GetCollectionStatistics returns statistics for collection for now only row count is returned

func (*Server) GetCompactionState

GetCompactionState gets the state of a compaction

func (*Server) GetCompactionStateWithPlans

func (s *Server) GetCompactionStateWithPlans(ctx context.Context, req *milvuspb.GetCompactionPlansRequest) (*milvuspb.GetCompactionPlansResponse, error)

GetCompactionStateWithPlans returns the compaction state of given plan

func (*Server) GetComponentStates

GetComponentStates returns DataCoord's current state

func (*Server) GetFlushAllState

GetFlushAllState checks if all DML messages before `FlushAllTs` have been flushed.

func (*Server) GetFlushState

GetFlushState gets the flush state of the collection based on the provided flush ts and segment IDs.

func (*Server) GetFlushedSegments

GetFlushedSegments returns all segment matches provided criterion and in state Flushed or Dropped (compacted but not GCed yet) If requested partition id < 0, ignores the partition id filter

func (*Server) GetIndexBuildProgress

GetIndexBuildProgress get the index building progress by num rows. Deprecated

func (*Server) GetIndexInfos

GetIndexInfos gets the index file paths for segment from DataCoord.

func (*Server) GetIndexState

GetIndexState gets the index state of the index name in the request from Proxy. Deprecated

func (*Server) GetIndexStatistics

GetIndexStatistics get the statistics of the index. DescribeIndex doesn't contain statistics.

func (*Server) GetInsertBinlogPaths

GetInsertBinlogPaths returns binlog paths info for requested segments

func (*Server) GetMetrics

GetMetrics returns DataCoord metrics info it may include SystemMetrics, Topology metrics, etc.

func (*Server) GetPartitionStatistics

GetPartitionStatistics returns statistics for partition if partID is empty, return statistics for all partitions of the collection for now only row count is returned

func (*Server) GetRecoveryInfo

GetRecoveryInfo get recovery info for segment. Called by: QueryCoord.

func (*Server) GetRecoveryInfoV2

GetRecoveryInfoV2 get recovery info for segment Called by: QueryCoord.

func (*Server) GetSegmentInfo

GetSegmentInfo returns segment info requested, status, row count, etc included Called by: QueryCoord, DataNode, IndexCoord, Proxy.

func (*Server) GetSegmentInfoChannel

func (s *Server) GetSegmentInfoChannel(ctx context.Context, req *datapb.GetSegmentInfoChannelRequest) (*milvuspb.StringResponse, error)

GetSegmentInfoChannel legacy API, returns segment info statistics channel

func (*Server) GetSegmentStates

GetSegmentStates returns segments state

func (*Server) GetSegmentsByStates

GetSegmentsByStates returns all segment matches provided criterion and States If requested partition id < 0, ignores the partition id filter

func (*Server) GetStateCode

func (s *Server) GetStateCode() commonpb.StateCode

func (*Server) GetStatisticsChannel

GetStatisticsChannel legacy API, returns statistics channel name

func (*Server) GetTimeTickChannel

GetTimeTickChannel legacy API, returns time tick channel name

func (*Server) Init

func (s *Server) Init() error

Init change server state to Initializing

func (*Server) ListIndexes

ListIndexes returns all indexes created on provided collection.

func (*Server) ManualCompaction

ManualCompaction triggers a compaction for a collection

func (*Server) MarkSegmentsDropped

func (s *Server) MarkSegmentsDropped(ctx context.Context, req *datapb.MarkSegmentsDroppedRequest) (*commonpb.Status, error)

MarkSegmentsDropped marks the given segments as `Dropped`. An error status will be returned and error will be logged, if we failed to mark *all* segments. Deprecated, do not use it

func (*Server) QuitSignal

func (s *Server) QuitSignal() <-chan struct{}

QuitSignal returns signal when server quits

func (*Server) Register

func (s *Server) Register() error

Register registers data service at etcd

func (*Server) ReportDataNodeTtMsgs

func (s *Server) ReportDataNodeTtMsgs(ctx context.Context, req *datapb.ReportDataNodeTtMsgsRequest) (*commonpb.Status, error)

ReportDataNodeTtMsgs gets timetick messages from datanode.

func (*Server) SaveBinlogPaths

func (s *Server) SaveBinlogPaths(ctx context.Context, req *datapb.SaveBinlogPathsRequest) (*commonpb.Status, error)

SaveBinlogPaths updates segment related binlog path works for Checkpoints and Flush

func (*Server) SetAddress

func (s *Server) SetAddress(address string)

func (*Server) SetDataNodeCreator

func (s *Server) SetDataNodeCreator(f func(context.Context, string, int64) (types.DataNodeClient, error))

func (*Server) SetEtcdClient

func (s *Server) SetEtcdClient(client *clientv3.Client)

SetEtcdClient sets etcd client for datacoord.

func (*Server) SetIndexNodeCreator

func (s *Server) SetIndexNodeCreator(f func(context.Context, string, int64) (types.IndexNodeClient, error))

func (*Server) SetRootCoordClient

func (s *Server) SetRootCoordClient(rootCoord types.RootCoordClient)

func (*Server) SetSegmentState

SetSegmentState reset the state of the given segment.

func (*Server) SetTiKVClient

func (s *Server) SetTiKVClient(client *txnkv.Client)

func (*Server) ShowConfigurations

ShowConfigurations returns the configurations of DataCoord matching req.Pattern

func (*Server) Start

func (s *Server) Start() error

Start initialize `Server` members and start loops, follow steps are taken:

  1. initialize message factory parameters
  2. initialize root coord client, meta, datanode cluster, segment info channel, allocator, segment manager
  3. start service discovery and server loops, which includes message stream handler (segment statistics,datanode tt) datanodes etcd watch, etcd alive check and flush completed status check
  4. set server state to Healthy

func (*Server) Stop

func (s *Server) Stop() error

Stop do the Server finalize processes it checks the server status is healthy, if not, just quit if Server is healthy, set server state to stopped, release etcd session,

stop message stream client and stop server loops

func (*Server) UpdateChannelCheckpoint

func (s *Server) UpdateChannelCheckpoint(ctx context.Context, req *datapb.UpdateChannelCheckpointRequest) (*commonpb.Status, error)

UpdateChannelCheckpoint updates channel checkpoint in dataCoord.

func (*Server) UpdateSegmentStatistics

func (s *Server) UpdateSegmentStatistics(ctx context.Context, req *datapb.UpdateSegmentStatisticsRequest) (*commonpb.Status, error)

UpdateSegmentStatistics updates a segment's stats.

func (*Server) WatchChannels

WatchChannels notifies DataCoord to watch vchannels of a collection.

type ServerHandler

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

ServerHandler is a helper of Server

func (*ServerHandler) CheckShouldDropChannel

func (h *ServerHandler) CheckShouldDropChannel(channel string) bool

CheckShouldDropChannel returns whether specified channel is marked to be removed

func (*ServerHandler) FinishDropChannel

func (h *ServerHandler) FinishDropChannel(channel string, collectionID int64) error

FinishDropChannel cleans up the remove flag for channels this function is a wrapper of server.meta.FinishDropChannel

func (*ServerHandler) GetChannelSeekPosition

func (h *ServerHandler) GetChannelSeekPosition(channel RWChannel, partitionIDs ...UniqueID) *msgpb.MsgPosition

GetChannelSeekPosition gets channel seek position from:

  1. Channel checkpoint meta;
  2. Segments earliest dml position;
  3. Collection start position; And would return if any position is valid.

func (*ServerHandler) GetCollection

func (h *ServerHandler) GetCollection(ctx context.Context, collectionID UniqueID) (*collectionInfo, error)

GetCollection returns collection info with specified collection id

func (*ServerHandler) GetDataVChanPositions

func (h *ServerHandler) GetDataVChanPositions(channel RWChannel, partitionID UniqueID) *datapb.VchannelInfo

GetDataVChanPositions gets vchannel latest positions with provided dml channel names for DataNode.

func (*ServerHandler) GetQueryVChanPositions

func (h *ServerHandler) GetQueryVChanPositions(channel RWChannel, partitionIDs ...UniqueID) *datapb.VchannelInfo

GetQueryVChanPositions gets vchannel latest positions with provided dml channel names for QueryCoord, we expect QueryCoord gets the indexed segments to load, so the flushed segments below are actually the indexed segments, the unflushed segments are actually the segments without index, even they are flushed.

func (*ServerHandler) HasCollection

func (h *ServerHandler) HasCollection(ctx context.Context, collectionID UniqueID) (bool, error)

HasCollection returns whether the collection exist from user's perspective.

type ServerHelper

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

ServerHelper datacoord server injection helper

type Session

type Session struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Session contains session info of a node

func NewSession

func NewSession(info *NodeInfo, creator dataNodeCreatorFunc) *Session

NewSession creates a new session

func (*Session) Dispose

func (n *Session) Dispose()

Dispose releases client connection

func (*Session) GetOrCreateClient

func (n *Session) GetOrCreateClient(ctx context.Context) (types.DataNodeClient, error)

GetOrCreateClient gets or creates a new client for session

type SessionManager

type SessionManager interface {
	AddSession(node *NodeInfo)
	DeleteSession(node *NodeInfo)
	GetSessionIDs() []int64
	GetSessions() []*Session

	Flush(ctx context.Context, nodeID int64, req *datapb.FlushSegmentsRequest)
	FlushChannels(ctx context.Context, nodeID int64, req *datapb.FlushChannelsRequest) error
	Compaction(ctx context.Context, nodeID int64, plan *datapb.CompactionPlan) error
	SyncSegments(nodeID int64, req *datapb.SyncSegmentsRequest) error
	GetCompactionPlansResults() (map[int64]*typeutil.Pair[int64, *datapb.CompactionPlanResult], error)
	NotifyChannelOperation(ctx context.Context, nodeID int64, req *datapb.ChannelOperationsRequest) error
	CheckChannelOperationProgress(ctx context.Context, nodeID int64, info *datapb.ChannelWatchInfo) (*datapb.ChannelOperationProgressResponse, error)
	PreImport(nodeID int64, in *datapb.PreImportRequest) error
	ImportV2(nodeID int64, in *datapb.ImportRequest) error
	QueryPreImport(nodeID int64, in *datapb.QueryPreImportRequest) (*datapb.QueryPreImportResponse, error)
	QueryImport(nodeID int64, in *datapb.QueryImportRequest) (*datapb.QueryImportResponse, error)
	DropImport(nodeID int64, in *datapb.DropImportRequest) error
	CheckHealth(ctx context.Context) error
	Close()
}

type SessionManagerImpl

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

SessionManagerImpl provides the grpc interfaces of cluster

func NewSessionManagerImpl

func NewSessionManagerImpl(options ...SessionOpt) *SessionManagerImpl

NewSessionManagerImpl creates a new SessionManagerImpl

func (*SessionManagerImpl) AddSession

func (c *SessionManagerImpl) AddSession(node *NodeInfo)

AddSession creates a new session

func (*SessionManagerImpl) CheckChannelOperationProgress

func (c *SessionManagerImpl) CheckChannelOperationProgress(ctx context.Context, nodeID int64, info *datapb.ChannelWatchInfo) (*datapb.ChannelOperationProgressResponse, error)

func (*SessionManagerImpl) CheckHealth

func (c *SessionManagerImpl) CheckHealth(ctx context.Context) error

func (*SessionManagerImpl) Close

func (c *SessionManagerImpl) Close()

Close release sessions

func (*SessionManagerImpl) Compaction

func (c *SessionManagerImpl) Compaction(ctx context.Context, nodeID int64, plan *datapb.CompactionPlan) error

Compaction is a grpc interface. It will send request to DataNode with provided `nodeID` synchronously.

func (*SessionManagerImpl) DeleteSession

func (c *SessionManagerImpl) DeleteSession(node *NodeInfo)

DeleteSession removes the node session

func (*SessionManagerImpl) DropImport

func (c *SessionManagerImpl) DropImport(nodeID int64, in *datapb.DropImportRequest) error

func (*SessionManagerImpl) Flush

func (c *SessionManagerImpl) Flush(ctx context.Context, nodeID int64, req *datapb.FlushSegmentsRequest)

Flush is a grpc interface. It will send req to nodeID asynchronously

func (*SessionManagerImpl) FlushChannels

func (c *SessionManagerImpl) FlushChannels(ctx context.Context, nodeID int64, req *datapb.FlushChannelsRequest) error

func (*SessionManagerImpl) GetCompactionPlansResults

func (c *SessionManagerImpl) GetCompactionPlansResults() (map[int64]*typeutil.Pair[int64, *datapb.CompactionPlanResult], error)

GetCompactionPlanResults returns map[planID]*pair[nodeID, *CompactionPlanResults]

func (*SessionManagerImpl) GetSessionIDs

func (c *SessionManagerImpl) GetSessionIDs() []int64

GetSessionIDs returns IDs of all live DataNodes.

func (*SessionManagerImpl) GetSessions

func (c *SessionManagerImpl) GetSessions() []*Session

GetSessions gets all node sessions

func (*SessionManagerImpl) ImportV2

func (c *SessionManagerImpl) ImportV2(nodeID int64, in *datapb.ImportRequest) error

func (*SessionManagerImpl) NotifyChannelOperation

func (c *SessionManagerImpl) NotifyChannelOperation(ctx context.Context, nodeID int64, req *datapb.ChannelOperationsRequest) error

func (*SessionManagerImpl) PreImport

func (c *SessionManagerImpl) PreImport(nodeID int64, in *datapb.PreImportRequest) error

func (*SessionManagerImpl) QueryImport

func (*SessionManagerImpl) QueryPreImport

func (*SessionManagerImpl) SyncSegments

func (c *SessionManagerImpl) SyncSegments(nodeID int64, req *datapb.SyncSegmentsRequest) error

SyncSegments is a grpc interface. It will send request to DataNode with provided `nodeID` synchronously.

type SessionOpt

type SessionOpt func(c *SessionManagerImpl)

SessionOpt provides a way to set params in SessionManagerImpl

type TaskType

type TaskType int
const (
	PreImportTaskType TaskType = 0
	ImportTaskType    TaskType = 1
)

func (TaskType) String

func (t TaskType) String() string

type Timestamp

type Timestamp = typeutil.Timestamp

Timestamp shortcurt for typeutil.Timestamp

type TriggerManager

type TriggerManager interface {
	Notify(UniqueID, CompactionTriggerType, []CompactionView)
}

type UniqueID

type UniqueID = typeutil.UniqueID

UniqueID shortcut for typeutil.UniqueID

type UpdateAction

type UpdateAction func(task ImportTask)

func UpdateCompleteTime

func UpdateCompleteTime(completeTime string) UpdateAction

func UpdateFileStats

func UpdateFileStats(fileStats []*datapb.ImportFileStats) UpdateAction

func UpdateNodeID

func UpdateNodeID(nodeID int64) UpdateAction

func UpdateReason

func UpdateReason(reason string) UpdateAction

func UpdateSegmentIDs

func UpdateSegmentIDs(segmentIDs []UniqueID) UpdateAction

func UpdateState

func UpdateState(state datapb.ImportTaskStateV2) UpdateAction

type UpdateJobAction

type UpdateJobAction func(job ImportJob)

func UpdateJobCompleteTime

func UpdateJobCompleteTime(completeTime string) UpdateJobAction

func UpdateJobReason

func UpdateJobReason(reason string) UpdateJobAction

func UpdateJobState

func UpdateJobState(state internalpb.ImportJobState) UpdateJobAction

func UpdateRequestedDiskSize

func UpdateRequestedDiskSize(requestSize int64) UpdateJobAction

type UpdateOperator

type UpdateOperator func(*updateSegmentPack) bool

func AddBinlogsOperator

func AddBinlogsOperator(segmentID int64, binlogs, statslogs, deltalogs []*datapb.FieldBinlog) UpdateOperator

Add binlogs in segmentInfo

func CreateL0Operator

func CreateL0Operator(collectionID, partitionID, segmentID int64, channel string) UpdateOperator

func UpdateBinlogsOperator

func UpdateBinlogsOperator(segmentID int64, binlogs, statslogs, deltalogs []*datapb.FieldBinlog) UpdateOperator

func UpdateCheckPointOperator

func UpdateCheckPointOperator(segmentID int64, checkpoints []*datapb.CheckPoint) UpdateOperator

UpdateCheckPointOperator updates segment checkpoint and num rows

func UpdateCompactedOperator

func UpdateCompactedOperator(segmentID int64) UpdateOperator

func UpdateDmlPosition

func UpdateDmlPosition(segmentID int64, dmlPosition *msgpb.MsgPosition) UpdateOperator

func UpdateImportedRows

func UpdateImportedRows(segmentID int64, rows int64) UpdateOperator

func UpdateIsImporting

func UpdateIsImporting(segmentID int64, isImporting bool) UpdateOperator

func UpdateStartPosition

func UpdateStartPosition(startPositions []*datapb.SegmentStartPosition) UpdateOperator

update startPosition

func UpdateStatusOperator

func UpdateStatusOperator(segmentID int64, status commonpb.SegmentState) UpdateOperator

Set status of segment and record dropped time when change segment status to dropped

func UpdateStorageVersionOperator

func UpdateStorageVersionOperator(segmentID int64, version int64) UpdateOperator

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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