datacoord

package
v0.10.3-0...-930112e Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 91 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 (
	ErrFull          = errors.New("compaction queue is full")
	ErrNoSuchElement = errors.New("compaction queue has no element")
)
View Source
var ChannelOpTypeNames = []string{"Add", "Delete", "Watch", "Release"}

ChannelOpTypeNames implements zap log marshaller for ChannelOpSet.

View Source
var ImportTaskTypeName = map[TaskType]string{
	0: "PreImportTask",
	1: "ImportTask",
}
View Source
var Params = paramtable.Get()

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.Allocator) (*datapb.ImportRequest, error)

func AssemblePreImportRequest

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

func AssignSegments

func AssignSegments(job ImportJob, task ImportTask, alloc allocator.Allocator, meta *meta) ([]int64, error)

func CheckAllChannelsWatched

func CheckAllChannelsWatched(meta *meta, channelManager ChannelManager) error

func CheckCheckPointsHealth

func CheckCheckPointsHealth(meta *meta) error

func CheckDiskQuota

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

func DropImportTask

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

func GetBinlogCount

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

func GetBinlogEntriesNum

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

func GetBinlogSizeAsBytes

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

func GetIndexType

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

func GetJobProgress

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

GetJobProgress calculates the importing job progress. The weight of each status is as follows: 10%: Pending 30%: PreImporting 30%: Importing 10%: Stats 10%: IndexBuilding 10%: Completed TODO: Wrap a function to map status to user status. TODO: Save these progress to job instead of recalculating.

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, allDiskIndex bool) [][]*datapb.ImportFileStats

func UpdateCompactionSegmentSizeMetrics

func UpdateCompactionSegmentSizeMetrics(segments []*datapb.CompactionSegment)

func UpdateParams

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

func ValidateIndexParams

func ValidateIndexParams(index *model.Index) 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 AssignPolicy

type AssignPolicy func(currentCluster Assignments, toAssign *NodeChannelInfo, exclusiveNodes []int64) *ChannelOpSet

Assign policy assigns channels to nodes. CurrentCluster refers to the current distributions ToAssign refers to the target channels needed to be reassigned

if provided, this policy will only assign these channels
if empty, this policy will balance the currentCluster

ExclusiveNodes means donot assign channels to these nodes.

type Assignments

type Assignments []*NodeChannelInfo

func (Assignments) GetChannelCount

func (a Assignments) GetChannelCount(nodeID int64) int

func (Assignments) MarshalLogArray

func (a Assignments) MarshalLogArray(enc zapcore.ArrayEncoder) error

type BalanceChannelPolicy

type BalanceChannelPolicy func(cluster Assignments) *ChannelOpSet

BalanceChannelPolicy try to balance watched channels to registered nodes

type ChannelBGChecker

type ChannelBGChecker func(ctx context.Context)

ChannelBGChecker are goroutining running background

type ChannelFilter

type ChannelFilter string

func (ChannelFilter) AddFilter

func (f ChannelFilter) AddFilter(criterion *segmentCriterion)

func (ChannelFilter) Match

func (f ChannelFilter) Match(segment *SegmentInfo) bool

type ChannelManager

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

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

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

	GetChannel(nodeID int64, channel string) (RWChannel, bool)
	GetNodeChannelsByCollectionID(collectionID int64) map[int64][]string
	GetChannelsByCollectionID(collectionID int64) []RWChannel
	GetChannelNamesByCollectionID(collectionID int64) []string

	GetChannelWatchInfos() map[int64]map[string]*datapb.ChannelWatchInfo
}

type ChannelManagerImpl

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

func NewChannelManager

func NewChannelManager(
	kv kv.TxnKV,
	h Handler,
	subCluster SubCluster,
	alloc allocator.GlobalIDAllocatorInterface,
	options ...ChannelmanagerOpt,
) (*ChannelManagerImpl, error)

func (*ChannelManagerImpl) AddNode

func (m *ChannelManagerImpl) AddNode(nodeID UniqueID) error

func (*ChannelManagerImpl) AdvanceChannelState

func (m *ChannelManagerImpl) AdvanceChannelState(ctx context.Context)

func (*ChannelManagerImpl) Balance

func (m *ChannelManagerImpl) Balance()

func (*ChannelManagerImpl) Check

func (m *ChannelManagerImpl) Check(ctx context.Context, nodeID int64, info *datapb.ChannelWatchInfo) (successful bool, got bool)

func (*ChannelManagerImpl) CheckLoop

func (m *ChannelManagerImpl) CheckLoop(ctx context.Context)

func (*ChannelManagerImpl) Close

func (m *ChannelManagerImpl) Close()

func (*ChannelManagerImpl) DeleteNode

func (m *ChannelManagerImpl) DeleteNode(nodeID UniqueID) error

func (*ChannelManagerImpl) FindWatcher

func (m *ChannelManagerImpl) FindWatcher(channel string) (UniqueID, error)

func (*ChannelManagerImpl) GetChannel

func (m *ChannelManagerImpl) GetChannel(nodeID int64, channelName string) (RWChannel, bool)

func (*ChannelManagerImpl) GetChannelNamesByCollectionID

func (m *ChannelManagerImpl) GetChannelNamesByCollectionID(collectionID int64) []string

func (*ChannelManagerImpl) GetChannelWatchInfos

func (m *ChannelManagerImpl) GetChannelWatchInfos() map[int64]map[string]*datapb.ChannelWatchInfo

func (*ChannelManagerImpl) GetChannelsByCollectionID

func (m *ChannelManagerImpl) GetChannelsByCollectionID(collectionID int64) []RWChannel

func (*ChannelManagerImpl) GetNodeChannelsByCollectionID

func (m *ChannelManagerImpl) GetNodeChannelsByCollectionID(collectionID int64) map[int64][]string

func (*ChannelManagerImpl) Match

func (m *ChannelManagerImpl) Match(nodeID UniqueID, channel string) bool

func (*ChannelManagerImpl) Notify

func (m *ChannelManagerImpl) Notify(ctx context.Context, nodeID int64, info *datapb.ChannelWatchInfo) error

func (*ChannelManagerImpl) Release

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

Release writes ToRelease channel watch states for a channel

func (*ChannelManagerImpl) Startup

func (m *ChannelManagerImpl) Startup(ctx context.Context, legacyNodes, allNodes []int64) error

func (*ChannelManagerImpl) Watch

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

type ChannelOp

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

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

func NewChannelOp

func NewChannelOp(ID int64, opType ChannelOpType, 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 AvgAssignByCountPolicy

func AvgAssignByCountPolicy(currentCluster Assignments, toAssign *NodeChannelInfo, execlusiveNodes []int64) *ChannelOpSet

func AvgBalanceChannelPolicy

func AvgBalanceChannelPolicy(cluster Assignments) *ChannelOpSet

AvgBalanceChannelPolicy tries to balance channel evenly

func EmptyAssignPolicy

func EmptyAssignPolicy(currentCluster Assignments, toAssign *NodeChannelInfo, execlusiveNodes []int64) *ChannelOpSet

func EmptyBalancePolicy

func EmptyBalancePolicy(cluster Assignments) *ChannelOpSet

EmptyBalancePolicy is a dummy balance 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) Append

func (c *ChannelOpSet) Append(ID int64, opType ChannelOpType, channels ...RWChannel)

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
	Watch
	Release
)

type ChannelPolicyFactory

type ChannelPolicyFactory interface {
	// NewBalancePolicy creates a new channel balance policy.
	NewBalancePolicy() BalanceChannelPolicy

	NewAssignPolicy() AssignPolicy
}

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

type ChannelPolicyFactoryV1

type ChannelPolicyFactoryV1 struct{}

ChannelPolicyFactoryV1 equal to policy batch

func NewChannelPolicyFactoryV1

func NewChannelPolicyFactoryV1() *ChannelPolicyFactoryV1

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

func (*ChannelPolicyFactoryV1) NewAssignPolicy

func (f *ChannelPolicyFactoryV1) NewAssignPolicy() AssignPolicy

func (*ChannelPolicyFactoryV1) NewBalancePolicy

func (f *ChannelPolicyFactoryV1) NewBalancePolicy() BalanceChannelPolicy

type ChannelSelector

type ChannelSelector func(ch *StateChannel) bool

func WithChannelName

func WithChannelName(channel string) ChannelSelector

func WithChannelStates

func WithChannelStates(states ...ChannelState) ChannelSelector

func WithCollectionIDV2

func WithCollectionIDV2(collectionID int64) ChannelSelector

type ChannelState

type ChannelState string
const (
	Standby   ChannelState = "Standby"
	ToWatch   ChannelState = "ToWatch"
	Watching  ChannelState = "Watching"
	Watched   ChannelState = "Watched"
	ToRelease ChannelState = "ToRelease"
	Releasing ChannelState = "Releasing"
	Legacy    ChannelState = "Legacy"
)

type ChannelmanagerOpt

type ChannelmanagerOpt func(c *ChannelManagerImpl)

ChannelmanagerOpt is to set optional parameters in channel manager.

type Cluster

type Cluster interface {
	Startup(ctx context.Context, nodes []*session.NodeInfo) error
	Register(node *session.NodeInfo) error
	UnRegister(node *session.NodeInfo) error
	Watch(ctx context.Context, ch RWChannel) 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
	QuerySlots() map[int64]int64
	GetSessions() []*session.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 session.DataNodeManager, 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.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) QuerySlots

func (c *ClusterImpl) QuerySlots() map[int64]int64

func (*ClusterImpl) Register

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

Register registers a new node in cluster

func (*ClusterImpl) Startup

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

Startup inits the cluster with the given data nodes.

func (*ClusterImpl) UnRegister

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

UnRegister removes a node from cluster

func (*ClusterImpl) Watch

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

Watch tries to add a channel in datanode cluster

type ClusteringSegmentsView

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

func (*ClusteringSegmentsView) Append

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

func (*ClusteringSegmentsView) ForceTrigger

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

func (*ClusteringSegmentsView) GetGroupLabel

func (v *ClusteringSegmentsView) GetGroupLabel() *CompactionGroupLabel

func (*ClusteringSegmentsView) GetSegmentsView

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

func (*ClusteringSegmentsView) String

func (v *ClusteringSegmentsView) String() string

func (*ClusteringSegmentsView) Trigger

type CollectionFilter

type CollectionFilter int64

func (CollectionFilter) AddFilter

func (f CollectionFilter) AddFilter(criterion *segmentCriterion)

func (CollectionFilter) Match

func (f CollectionFilter) Match(segment *SegmentInfo) bool

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 {
	GetSegment(segID UniqueID) *SegmentInfo
	SelectSegments(filters ...SegmentFilter) []*SegmentInfo
	GetHealthySegment(segID UniqueID) *SegmentInfo
	UpdateSegmentsInfo(operators ...UpdateOperator) error
	SetSegmentsCompacting(segmentID []int64, compacting bool)
	CheckAndSetSegmentsCompacting(segmentIDs []int64) (bool, bool)
	CompleteCompactionMutation(t *datapb.CompactionTask, result *datapb.CompactionPlanResult) ([]*SegmentInfo, *segMetricMutation, error)
	CleanPartitionStatsInfo(info *datapb.PartitionStatsInfo) error

	SaveCompactionTask(task *datapb.CompactionTask) error
	DropCompactionTask(task *datapb.CompactionTask) error
	GetCompactionTasks() map[int64][]*datapb.CompactionTask
	GetCompactionTasksByTriggerID(triggerID int64) []*datapb.CompactionTask

	GetIndexMeta() *indexMeta
	GetAnalyzeMeta() *analyzeMeta
	GetPartitionStatsMeta() *partitionStatsMeta
	GetCompactionTaskMeta() *compactionTaskMeta
}

type CompactionQueue

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

func NewCompactionQueue

func NewCompactionQueue(capacity int, prioritizer Prioritizer) *CompactionQueue

func (*CompactionQueue) Dequeue

func (q *CompactionQueue) Dequeue() (CompactionTask, error)

func (*CompactionQueue) Enqueue

func (q *CompactionQueue) Enqueue(t CompactionTask) error

func (*CompactionQueue) ForEach

func (q *CompactionQueue) ForEach(f func(CompactionTask))

ForEach calls f on each item in the queue.

func (*CompactionQueue) Len

func (q *CompactionQueue) Len() int

func (*CompactionQueue) RemoveAll

func (q *CompactionQueue) RemoveAll(predicate func(CompactionTask) bool)

func (*CompactionQueue) UpdatePrioritizer

func (q *CompactionQueue) UpdatePrioritizer(prioritizer Prioritizer)

type CompactionTask

type CompactionTask interface {
	Process() bool
	BuildCompactionRequest() (*datapb.CompactionPlan, error)
	GetSlotUsage() int64
	GetLabel() string

	SetTask(*datapb.CompactionTask)
	GetTaskProto() *datapb.CompactionTask
	SetPlan(plan *datapb.CompactionPlan)
	ShadowClone(opts ...compactionTaskOpt) *datapb.CompactionTask

	SetNodeID(UniqueID) error
	NeedReAssignNodeID() bool
	GetSpan() trace.Span
	SetSpan(trace.Span)
	SaveTaskMeta() error
}

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.Allocator, handler Handler, compactionHandler compactionPlanContext, meta *meta) *CompactionTriggerManager

func (*CompactionTriggerManager) ManualTrigger

func (m *CompactionTriggerManager) ManualTrigger(ctx context.Context, collectionID int64, clusteringCompaction bool) (UniqueID, error)

func (*CompactionTriggerManager) Start

func (m *CompactionTriggerManager) Start()

func (*CompactionTriggerManager) Stop

func (m *CompactionTriggerManager) Stop()

func (*CompactionTriggerManager) SubmitClusteringViewToScheduler

func (m *CompactionTriggerManager) SubmitClusteringViewToScheduler(ctx context.Context, view CompactionView)

func (*CompactionTriggerManager) SubmitL0ViewToScheduler

func (m *CompactionTriggerManager) SubmitL0ViewToScheduler(ctx context.Context, view CompactionView)

func (*CompactionTriggerManager) SubmitSingleViewToScheduler

func (m *CompactionTriggerManager) SubmitSingleViewToScheduler(ctx context.Context, view CompactionView)

type CompactionTriggerType

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

type CompactionView

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

type EmptyChannelPolicyFactory

type EmptyChannelPolicyFactory struct{}

func NewEmptyChannelPolicyFactory

func NewEmptyChannelPolicyFactory() *EmptyChannelPolicyFactory

func (*EmptyChannelPolicyFactory) NewAssignPolicy

func (f *EmptyChannelPolicyFactory) NewAssignPolicy() AssignPolicy

func (*EmptyChannelPolicyFactory) NewBalancePolicy

func (f *EmptyChannelPolicyFactory) NewBalancePolicy() BalanceChannelPolicy

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.Allocator,
	imeta ImportMeta,
	sjm StatsJobManager,
) 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
	GetTR() *timerecord.TimeRecorder
	Clone() ImportJob
}

type ImportJobFilter

type ImportJobFilter func(job ImportJob) bool

func WithCollectionID

func WithCollectionID(collectionID int64) ImportJobFilter

func WithJobStates

func WithJobStates(states ...internalpb.ImportJobState) ImportJobFilter

func WithoutJobStates

func WithoutJobStates(states ...internalpb.ImportJobState) ImportJobFilter

type ImportMeta

type ImportMeta interface {
	AddJob(job ImportJob) error
	UpdateJob(jobID int64, actions ...UpdateJobAction) error
	GetJob(jobID int64) ImportJob
	GetJobBy(filters ...ImportJobFilter) []ImportJob
	CountJobBy(filters ...ImportJobFilter) int
	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
	TaskStatsJSON() string
}

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.Allocator,
	imeta ImportMeta,
) ImportScheduler

type ImportTask

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

func NewImportTasks

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

func NewPreImportTasks

func NewPreImportTasks(fileGroups [][]*internalpb.ImportFile,
	job ImportJob,
	alloc allocator.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 Item

type Item[T any] struct {
	// contains filtered or unexported fields
}

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 {

	// Deprecated: AllocSegment allocates rows and record the allocation, will be deprecated after enabling streamingnode.
	AllocSegment(ctx context.Context, collectionID, partitionID UniqueID, channelName string, requestRows int64) ([]*Allocation, error)

	// AllocNewGrowingSegment allocates segment for streaming node.
	AllocNewGrowingSegment(ctx context.Context, collectionID, partitionID, segmentID UniqueID, channelName string) (*SegmentInfo, error)

	// DropSegment drops the segment from manager.
	DropSegment(ctx context.Context, segmentID UniqueID)
	// 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 MixSegmentView

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

func (*MixSegmentView) Append

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

func (*MixSegmentView) ForceTrigger

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

func (*MixSegmentView) GetGroupLabel

func (v *MixSegmentView) GetGroupLabel() *CompactionGroupLabel

func (*MixSegmentView) GetSegmentsView

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

func (*MixSegmentView) String

func (v *MixSegmentView) String() string

func (*MixSegmentView) Trigger

func (v *MixSegmentView) Trigger() (CompactionView, string)

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) GetChannel

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

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

func (*MockChannelManager) GetChannelNamesByCollectionID

func (_m *MockChannelManager) GetChannelNamesByCollectionID(collectionID int64) []string

GetChannelNamesByCollectionID provides a mock function with given fields: collectionID

func (*MockChannelManager) GetChannelWatchInfos

func (_m *MockChannelManager) GetChannelWatchInfos() map[int64]map[string]*datapb.ChannelWatchInfo

GetChannelWatchInfos provides a mock function with given fields:

func (*MockChannelManager) GetChannelsByCollectionID

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

GetChannelsByCollectionID provides a mock function with given fields: collectionID

func (*MockChannelManager) GetNodeChannelsByCollectionID

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

GetNodeChannelsByCollectionID provides a mock function with given fields: collectionID

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) Startup

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

Startup provides a mock function with given fields: ctx, legacyNodes, allNodes

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) GetChannel

func (_e *MockChannelManager_Expecter) GetChannel(nodeID interface{}, channel interface{}) *MockChannelManager_GetChannel_Call

GetChannel is a helper method to define mock.On call

  • nodeID int64
  • channel string

func (*MockChannelManager_Expecter) GetChannelNamesByCollectionID

func (_e *MockChannelManager_Expecter) GetChannelNamesByCollectionID(collectionID interface{}) *MockChannelManager_GetChannelNamesByCollectionID_Call

GetChannelNamesByCollectionID is a helper method to define mock.On call

  • collectionID int64

func (*MockChannelManager_Expecter) GetChannelWatchInfos

GetChannelWatchInfos is a helper method to define mock.On call

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) 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) 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) Startup

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

Startup is a helper method to define mock.On call

  • ctx context.Context
  • legacyNodes []int64
  • allNodes []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_GetChannelNamesByCollectionID_Call

type MockChannelManager_GetChannelNamesByCollectionID_Call struct {
	*mock.Call
}

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

func (*MockChannelManager_GetChannelNamesByCollectionID_Call) Return

func (*MockChannelManager_GetChannelNamesByCollectionID_Call) Run

func (*MockChannelManager_GetChannelNamesByCollectionID_Call) RunAndReturn

type MockChannelManager_GetChannelWatchInfos_Call

type MockChannelManager_GetChannelWatchInfos_Call struct {
	*mock.Call
}

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

func (*MockChannelManager_GetChannelWatchInfos_Call) Return

func (*MockChannelManager_GetChannelWatchInfos_Call) Run

func (*MockChannelManager_GetChannelWatchInfos_Call) RunAndReturn

type MockChannelManager_GetChannel_Call

type MockChannelManager_GetChannel_Call struct {
	*mock.Call
}

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

func (*MockChannelManager_GetChannel_Call) Return

func (*MockChannelManager_GetChannel_Call) Run

func (*MockChannelManager_GetChannel_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_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_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_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 (_c *MockChannelManager_Startup_Call) Run(run func(ctx context.Context, legacyNodes []int64, allNodes []int64)) *MockChannelManager_Startup_Call

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.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) QuerySlots

func (_m *MockCluster) QuerySlots() map[int64]int64

QuerySlots provides a mock function with given fields:

func (*MockCluster) Register

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

Register provides a mock function with given fields: node

func (*MockCluster) Startup

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

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

func (*MockCluster) UnRegister

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

UnRegister provides a mock function with given fields: node

func (*MockCluster) Watch

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

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

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) QuerySlots

QuerySlots is a helper method to define mock.On call

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 *session.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 []*session.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 *session.NodeInfo

func (*MockCluster_Expecter) Watch

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

Watch is a helper method to define mock.On call

  • ctx context.Context
  • ch RWChannel

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

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_QuerySlots_Call

type MockCluster_QuerySlots_Call struct {
	*mock.Call
}

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

func (*MockCluster_QuerySlots_Call) Return

func (*MockCluster_QuerySlots_Call) Run

func (*MockCluster_QuerySlots_Call) RunAndReturn

func (_c *MockCluster_QuerySlots_Call) RunAndReturn(run func() map[int64]int64) *MockCluster_QuerySlots_Call

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

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 (*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 (*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) CheckAndSetSegmentsCompacting

func (_m *MockCompactionMeta) CheckAndSetSegmentsCompacting(segmentIDs []int64) (bool, bool)

CheckAndSetSegmentsCompacting provides a mock function with given fields: segmentIDs

func (*MockCompactionMeta) CleanPartitionStatsInfo

func (_m *MockCompactionMeta) CleanPartitionStatsInfo(info *datapb.PartitionStatsInfo) error

CleanPartitionStatsInfo provides a mock function with given fields: info

func (*MockCompactionMeta) CompleteCompactionMutation

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

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

func (*MockCompactionMeta) DropCompactionTask

func (_m *MockCompactionMeta) DropCompactionTask(task *datapb.CompactionTask) error

DropCompactionTask provides a mock function with given fields: task

func (*MockCompactionMeta) EXPECT

func (*MockCompactionMeta) GetAnalyzeMeta

func (_m *MockCompactionMeta) GetAnalyzeMeta() *analyzeMeta

GetAnalyzeMeta provides a mock function with given fields:

func (*MockCompactionMeta) GetCompactionTaskMeta

func (_m *MockCompactionMeta) GetCompactionTaskMeta() *compactionTaskMeta

GetCompactionTaskMeta provides a mock function with given fields:

func (*MockCompactionMeta) GetCompactionTasks

func (_m *MockCompactionMeta) GetCompactionTasks() map[int64][]*datapb.CompactionTask

GetCompactionTasks provides a mock function with given fields:

func (*MockCompactionMeta) GetCompactionTasksByTriggerID

func (_m *MockCompactionMeta) GetCompactionTasksByTriggerID(triggerID int64) []*datapb.CompactionTask

GetCompactionTasksByTriggerID provides a mock function with given fields: triggerID

func (*MockCompactionMeta) GetHealthySegment

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

GetHealthySegment provides a mock function with given fields: segID

func (*MockCompactionMeta) GetIndexMeta

func (_m *MockCompactionMeta) GetIndexMeta() *indexMeta

GetIndexMeta provides a mock function with given fields:

func (*MockCompactionMeta) GetPartitionStatsMeta

func (_m *MockCompactionMeta) GetPartitionStatsMeta() *partitionStatsMeta

GetPartitionStatsMeta provides a mock function with given fields:

func (*MockCompactionMeta) GetSegment

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

GetSegment provides a mock function with given fields: segID

func (*MockCompactionMeta) SaveCompactionTask

func (_m *MockCompactionMeta) SaveCompactionTask(task *datapb.CompactionTask) error

SaveCompactionTask provides a mock function with given fields: task

func (*MockCompactionMeta) SelectSegments

func (_m *MockCompactionMeta) SelectSegments(filters ...SegmentFilter) []*SegmentInfo

SelectSegments provides a mock function with given fields: filters

func (*MockCompactionMeta) SetSegmentsCompacting

func (_m *MockCompactionMeta) SetSegmentsCompacting(segmentID []int64, compacting bool)

SetSegmentsCompacting 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_CheckAndSetSegmentsCompacting_Call

type MockCompactionMeta_CheckAndSetSegmentsCompacting_Call struct {
	*mock.Call
}

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

func (*MockCompactionMeta_CheckAndSetSegmentsCompacting_Call) Return

func (*MockCompactionMeta_CheckAndSetSegmentsCompacting_Call) Run

func (*MockCompactionMeta_CheckAndSetSegmentsCompacting_Call) RunAndReturn

type MockCompactionMeta_CleanPartitionStatsInfo_Call

type MockCompactionMeta_CleanPartitionStatsInfo_Call struct {
	*mock.Call
}

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

func (*MockCompactionMeta_CleanPartitionStatsInfo_Call) Return

func (*MockCompactionMeta_CleanPartitionStatsInfo_Call) Run

func (*MockCompactionMeta_CleanPartitionStatsInfo_Call) RunAndReturn

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_DropCompactionTask_Call

type MockCompactionMeta_DropCompactionTask_Call struct {
	*mock.Call
}

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

func (*MockCompactionMeta_DropCompactionTask_Call) Return

func (*MockCompactionMeta_DropCompactionTask_Call) Run

func (*MockCompactionMeta_DropCompactionTask_Call) RunAndReturn

type MockCompactionMeta_Expecter

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

func (*MockCompactionMeta_Expecter) CheckAndSetSegmentsCompacting

func (_e *MockCompactionMeta_Expecter) CheckAndSetSegmentsCompacting(segmentIDs interface{}) *MockCompactionMeta_CheckAndSetSegmentsCompacting_Call

CheckAndSetSegmentsCompacting is a helper method to define mock.On call

  • segmentIDs []int64

func (*MockCompactionMeta_Expecter) CleanPartitionStatsInfo

func (_e *MockCompactionMeta_Expecter) CleanPartitionStatsInfo(info interface{}) *MockCompactionMeta_CleanPartitionStatsInfo_Call

CleanPartitionStatsInfo is a helper method to define mock.On call

  • info *datapb.PartitionStatsInfo

func (*MockCompactionMeta_Expecter) CompleteCompactionMutation

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

CompleteCompactionMutation is a helper method to define mock.On call

  • t *datapb.CompactionTask
  • result *datapb.CompactionPlanResult

func (*MockCompactionMeta_Expecter) DropCompactionTask

func (_e *MockCompactionMeta_Expecter) DropCompactionTask(task interface{}) *MockCompactionMeta_DropCompactionTask_Call

DropCompactionTask is a helper method to define mock.On call

  • task *datapb.CompactionTask

func (*MockCompactionMeta_Expecter) GetAnalyzeMeta

GetAnalyzeMeta is a helper method to define mock.On call

func (*MockCompactionMeta_Expecter) GetCompactionTaskMeta

GetCompactionTaskMeta is a helper method to define mock.On call

func (*MockCompactionMeta_Expecter) GetCompactionTasks

GetCompactionTasks is a helper method to define mock.On call

func (*MockCompactionMeta_Expecter) GetCompactionTasksByTriggerID

func (_e *MockCompactionMeta_Expecter) GetCompactionTasksByTriggerID(triggerID interface{}) *MockCompactionMeta_GetCompactionTasksByTriggerID_Call

GetCompactionTasksByTriggerID is a helper method to define mock.On call

  • triggerID int64

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) GetIndexMeta

GetIndexMeta is a helper method to define mock.On call

func (*MockCompactionMeta_Expecter) GetPartitionStatsMeta

GetPartitionStatsMeta is a helper method to define mock.On call

func (*MockCompactionMeta_Expecter) GetSegment

func (_e *MockCompactionMeta_Expecter) GetSegment(segID interface{}) *MockCompactionMeta_GetSegment_Call

GetSegment is a helper method to define mock.On call

  • segID int64

func (*MockCompactionMeta_Expecter) SaveCompactionTask

func (_e *MockCompactionMeta_Expecter) SaveCompactionTask(task interface{}) *MockCompactionMeta_SaveCompactionTask_Call

SaveCompactionTask is a helper method to define mock.On call

  • task *datapb.CompactionTask

func (*MockCompactionMeta_Expecter) SelectSegments

func (_e *MockCompactionMeta_Expecter) SelectSegments(filters ...interface{}) *MockCompactionMeta_SelectSegments_Call

SelectSegments is a helper method to define mock.On call

  • filters ...SegmentFilter

func (*MockCompactionMeta_Expecter) SetSegmentsCompacting

func (_e *MockCompactionMeta_Expecter) SetSegmentsCompacting(segmentID interface{}, compacting interface{}) *MockCompactionMeta_SetSegmentsCompacting_Call

SetSegmentsCompacting 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_GetAnalyzeMeta_Call

type MockCompactionMeta_GetAnalyzeMeta_Call struct {
	*mock.Call
}

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

func (*MockCompactionMeta_GetAnalyzeMeta_Call) Return

func (*MockCompactionMeta_GetAnalyzeMeta_Call) Run

func (*MockCompactionMeta_GetAnalyzeMeta_Call) RunAndReturn

func (_c *MockCompactionMeta_GetAnalyzeMeta_Call) RunAndReturn(run func() *analyzeMeta) *MockCompactionMeta_GetAnalyzeMeta_Call

type MockCompactionMeta_GetCompactionTaskMeta_Call

type MockCompactionMeta_GetCompactionTaskMeta_Call struct {
	*mock.Call
}

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

func (*MockCompactionMeta_GetCompactionTaskMeta_Call) Return

func (*MockCompactionMeta_GetCompactionTaskMeta_Call) Run

func (*MockCompactionMeta_GetCompactionTaskMeta_Call) RunAndReturn

func (_c *MockCompactionMeta_GetCompactionTaskMeta_Call) RunAndReturn(run func() *compactionTaskMeta) *MockCompactionMeta_GetCompactionTaskMeta_Call

type MockCompactionMeta_GetCompactionTasksByTriggerID_Call

type MockCompactionMeta_GetCompactionTasksByTriggerID_Call struct {
	*mock.Call
}

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

func (*MockCompactionMeta_GetCompactionTasksByTriggerID_Call) Return

func (*MockCompactionMeta_GetCompactionTasksByTriggerID_Call) Run

func (*MockCompactionMeta_GetCompactionTasksByTriggerID_Call) RunAndReturn

type MockCompactionMeta_GetCompactionTasks_Call

type MockCompactionMeta_GetCompactionTasks_Call struct {
	*mock.Call
}

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

func (*MockCompactionMeta_GetCompactionTasks_Call) Return

func (*MockCompactionMeta_GetCompactionTasks_Call) Run

func (*MockCompactionMeta_GetCompactionTasks_Call) RunAndReturn

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_GetIndexMeta_Call

type MockCompactionMeta_GetIndexMeta_Call struct {
	*mock.Call
}

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

func (*MockCompactionMeta_GetIndexMeta_Call) Return

func (*MockCompactionMeta_GetIndexMeta_Call) Run

func (*MockCompactionMeta_GetIndexMeta_Call) RunAndReturn

func (_c *MockCompactionMeta_GetIndexMeta_Call) RunAndReturn(run func() *indexMeta) *MockCompactionMeta_GetIndexMeta_Call

type MockCompactionMeta_GetPartitionStatsMeta_Call

type MockCompactionMeta_GetPartitionStatsMeta_Call struct {
	*mock.Call
}

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

func (*MockCompactionMeta_GetPartitionStatsMeta_Call) Return

func (*MockCompactionMeta_GetPartitionStatsMeta_Call) Run

func (*MockCompactionMeta_GetPartitionStatsMeta_Call) RunAndReturn

func (_c *MockCompactionMeta_GetPartitionStatsMeta_Call) RunAndReturn(run func() *partitionStatsMeta) *MockCompactionMeta_GetPartitionStatsMeta_Call

type MockCompactionMeta_GetSegment_Call

type MockCompactionMeta_GetSegment_Call struct {
	*mock.Call
}

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

func (*MockCompactionMeta_GetSegment_Call) Return

func (*MockCompactionMeta_GetSegment_Call) Run

func (*MockCompactionMeta_GetSegment_Call) RunAndReturn

type MockCompactionMeta_SaveCompactionTask_Call

type MockCompactionMeta_SaveCompactionTask_Call struct {
	*mock.Call
}

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

func (*MockCompactionMeta_SaveCompactionTask_Call) Return

func (*MockCompactionMeta_SaveCompactionTask_Call) Run

func (*MockCompactionMeta_SaveCompactionTask_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_SetSegmentsCompacting_Call

type MockCompactionMeta_SetSegmentsCompacting_Call struct {
	*mock.Call
}

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

func (*MockCompactionMeta_SetSegmentsCompacting_Call) Return

func (*MockCompactionMeta_SetSegmentsCompacting_Call) Run

func (*MockCompactionMeta_SetSegmentsCompacting_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_enqueueCompaction_Call

type MockCompactionPlanContext_enqueueCompaction_Call struct {
	*mock.Call
}

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

func (*MockCompactionPlanContext_enqueueCompaction_Call) Return

func (*MockCompactionPlanContext_enqueueCompaction_Call) Run

func (*MockCompactionPlanContext_enqueueCompaction_Call) RunAndReturn

type MockCompactionPlanContext_getCompactionInfo_Call

type MockCompactionPlanContext_getCompactionInfo_Call struct {
	*mock.Call
}

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

func (*MockCompactionPlanContext_getCompactionInfo_Call) Return

func (*MockCompactionPlanContext_getCompactionInfo_Call) Run

func (*MockCompactionPlanContext_getCompactionInfo_Call) RunAndReturn

type MockCompactionPlanContext_getCompactionTasksNumBySignalID_Call

type MockCompactionPlanContext_getCompactionTasksNumBySignalID_Call struct {
	*mock.Call
}

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

func (*MockCompactionPlanContext_getCompactionTasksNumBySignalID_Call) Return

func (*MockCompactionPlanContext_getCompactionTasksNumBySignalID_Call) Run

func (*MockCompactionPlanContext_getCompactionTasksNumBySignalID_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 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) AllocNewGrowingSegment

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

AllocNewGrowingSegment provides a mock function with given fields: ctx, collectionID, partitionID, segmentID, 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) 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_AllocNewGrowingSegment_Call

type MockManager_AllocNewGrowingSegment_Call struct {
	*mock.Call
}

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

func (*MockManager_AllocNewGrowingSegment_Call) Return

func (*MockManager_AllocNewGrowingSegment_Call) Run

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

func (*MockManager_AllocNewGrowingSegment_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) AllocNewGrowingSegment

func (_e *MockManager_Expecter) AllocNewGrowingSegment(ctx interface{}, collectionID interface{}, partitionID interface{}, segmentID interface{}, channelName interface{}) *MockManager_AllocNewGrowingSegment_Call

AllocNewGrowingSegment is a helper method to define mock.On call

  • ctx context.Context
  • collectionID int64
  • partitionID int64
  • segmentID 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) 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_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 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) AddNode

func (_m *MockRWChannelStore) AddNode(nodeID int64)

AddNode 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) GetNode

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

GetNode provides a mock function with given fields: nodeID

func (*MockRWChannelStore) GetNodeChannelsBy

func (_m *MockRWChannelStore) GetNodeChannelsBy(nodeSelector NodeSelector, channelSelectors ...ChannelSelector) []*NodeChannelInfo

GetNodeChannelsBy provides a mock function with given fields: nodeSelector, channelSelectors

func (*MockRWChannelStore) GetNodeChannelsByCollectionID

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

GetNodeChannelsByCollectionID provides a mock function with given fields: collectionID

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) HasChannel

func (_m *MockRWChannelStore) HasChannel(channel string) bool

HasChannel provides a mock function with given fields: channel

func (*MockRWChannelStore) Reload

func (_m *MockRWChannelStore) Reload() error

Reload provides a mock function with given fields:

func (*MockRWChannelStore) RemoveNode

func (_m *MockRWChannelStore) RemoveNode(nodeID int64)

RemoveNode provides a mock function with given fields: nodeID

func (*MockRWChannelStore) SetLegacyChannelByNode

func (_m *MockRWChannelStore) SetLegacyChannelByNode(nodeIDs ...int64)

SetLegacyChannelByNode provides a mock function with given fields: nodeIDs

func (*MockRWChannelStore) Update

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

Update provides a mock function with given fields: op

func (*MockRWChannelStore) UpdateState

func (_m *MockRWChannelStore) UpdateState(isSuccessful bool, channels ...RWChannel)

UpdateState provides a mock function with given fields: isSuccessful, channels

type MockRWChannelStore_AddNode_Call

type MockRWChannelStore_AddNode_Call struct {
	*mock.Call
}

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

func (*MockRWChannelStore_AddNode_Call) Return

func (*MockRWChannelStore_AddNode_Call) Run

func (*MockRWChannelStore_AddNode_Call) RunAndReturn

type MockRWChannelStore_Expecter

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

func (*MockRWChannelStore_Expecter) AddNode

func (_e *MockRWChannelStore_Expecter) AddNode(nodeID interface{}) *MockRWChannelStore_AddNode_Call

AddNode 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) 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) GetNodeChannelsBy

func (_e *MockRWChannelStore_Expecter) GetNodeChannelsBy(nodeSelector interface{}, channelSelectors ...interface{}) *MockRWChannelStore_GetNodeChannelsBy_Call

GetNodeChannelsBy is a helper method to define mock.On call

  • nodeSelector NodeSelector
  • channelSelectors ...ChannelSelector

func (*MockRWChannelStore_Expecter) GetNodeChannelsByCollectionID

func (_e *MockRWChannelStore_Expecter) GetNodeChannelsByCollectionID(collectionID interface{}) *MockRWChannelStore_GetNodeChannelsByCollectionID_Call

GetNodeChannelsByCollectionID is a helper method to define mock.On call

  • collectionID 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) HasChannel

func (_e *MockRWChannelStore_Expecter) HasChannel(channel interface{}) *MockRWChannelStore_HasChannel_Call

HasChannel is a helper method to define mock.On call

  • channel string

func (*MockRWChannelStore_Expecter) Reload

Reload is a helper method to define mock.On call

func (*MockRWChannelStore_Expecter) RemoveNode

func (_e *MockRWChannelStore_Expecter) RemoveNode(nodeID interface{}) *MockRWChannelStore_RemoveNode_Call

RemoveNode is a helper method to define mock.On call

  • nodeID int64

func (*MockRWChannelStore_Expecter) SetLegacyChannelByNode

func (_e *MockRWChannelStore_Expecter) SetLegacyChannelByNode(nodeIDs ...interface{}) *MockRWChannelStore_SetLegacyChannelByNode_Call

SetLegacyChannelByNode is a helper method to define mock.On call

  • nodeIDs ...int64

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

func (*MockRWChannelStore_Expecter) UpdateState

func (_e *MockRWChannelStore_Expecter) UpdateState(isSuccessful interface{}, channels ...interface{}) *MockRWChannelStore_UpdateState_Call

UpdateState is a helper method to define mock.On call

  • isSuccessful bool
  • channels ...RWChannel

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_GetNodeChannelsByCollectionID_Call

type MockRWChannelStore_GetNodeChannelsByCollectionID_Call struct {
	*mock.Call
}

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

func (*MockRWChannelStore_GetNodeChannelsByCollectionID_Call) Return

func (*MockRWChannelStore_GetNodeChannelsByCollectionID_Call) Run

func (*MockRWChannelStore_GetNodeChannelsByCollectionID_Call) RunAndReturn

type MockRWChannelStore_GetNodeChannelsBy_Call

type MockRWChannelStore_GetNodeChannelsBy_Call struct {
	*mock.Call
}

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

func (*MockRWChannelStore_GetNodeChannelsBy_Call) Return

func (*MockRWChannelStore_GetNodeChannelsBy_Call) Run

func (*MockRWChannelStore_GetNodeChannelsBy_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_HasChannel_Call

type MockRWChannelStore_HasChannel_Call struct {
	*mock.Call
}

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

func (*MockRWChannelStore_HasChannel_Call) Return

func (*MockRWChannelStore_HasChannel_Call) Run

func (*MockRWChannelStore_HasChannel_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_RemoveNode_Call

type MockRWChannelStore_RemoveNode_Call struct {
	*mock.Call
}

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

func (*MockRWChannelStore_RemoveNode_Call) Return

func (*MockRWChannelStore_RemoveNode_Call) Run

func (*MockRWChannelStore_RemoveNode_Call) RunAndReturn

type MockRWChannelStore_SetLegacyChannelByNode_Call

type MockRWChannelStore_SetLegacyChannelByNode_Call struct {
	*mock.Call
}

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

func (*MockRWChannelStore_SetLegacyChannelByNode_Call) Return

func (*MockRWChannelStore_SetLegacyChannelByNode_Call) Run

func (*MockRWChannelStore_SetLegacyChannelByNode_Call) RunAndReturn

type MockRWChannelStore_UpdateState_Call

type MockRWChannelStore_UpdateState_Call struct {
	*mock.Call
}

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

func (*MockRWChannelStore_UpdateState_Call) Return

func (*MockRWChannelStore_UpdateState_Call) Run

func (_c *MockRWChannelStore_UpdateState_Call) Run(run func(isSuccessful bool, channels ...RWChannel)) *MockRWChannelStore_UpdateState_Call

func (*MockRWChannelStore_UpdateState_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 MockStatsJobManager

type MockStatsJobManager struct {
	mock.Mock
}

MockStatsJobManager is an autogenerated mock type for the StatsJobManager type

func NewMockStatsJobManager

func NewMockStatsJobManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockStatsJobManager

NewMockStatsJobManager creates a new instance of MockStatsJobManager. 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 (*MockStatsJobManager) DropStatsTask

func (_m *MockStatsJobManager) DropStatsTask(originSegmentID int64, subJobType indexpb.StatsSubJob) error

DropStatsTask provides a mock function with given fields: originSegmentID, subJobType

func (*MockStatsJobManager) EXPECT

func (*MockStatsJobManager) GetStatsTaskState

func (_m *MockStatsJobManager) GetStatsTaskState(originSegmentID int64, subJobType indexpb.StatsSubJob) indexpb.JobState

GetStatsTaskState provides a mock function with given fields: originSegmentID, subJobType

func (*MockStatsJobManager) Start

func (_m *MockStatsJobManager) Start()

Start provides a mock function with given fields:

func (*MockStatsJobManager) Stop

func (_m *MockStatsJobManager) Stop()

Stop provides a mock function with given fields:

func (*MockStatsJobManager) SubmitStatsTask

func (_m *MockStatsJobManager) SubmitStatsTask(originSegmentID int64, targetSegmentID int64, subJobType indexpb.StatsSubJob, canRecycle bool) error

SubmitStatsTask provides a mock function with given fields: originSegmentID, targetSegmentID, subJobType, canRecycle

type MockStatsJobManager_DropStatsTask_Call

type MockStatsJobManager_DropStatsTask_Call struct {
	*mock.Call
}

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

func (*MockStatsJobManager_DropStatsTask_Call) Return

func (*MockStatsJobManager_DropStatsTask_Call) Run

func (*MockStatsJobManager_DropStatsTask_Call) RunAndReturn

type MockStatsJobManager_Expecter

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

func (*MockStatsJobManager_Expecter) DropStatsTask

func (_e *MockStatsJobManager_Expecter) DropStatsTask(originSegmentID interface{}, subJobType interface{}) *MockStatsJobManager_DropStatsTask_Call

DropStatsTask is a helper method to define mock.On call

  • originSegmentID int64
  • subJobType indexpb.StatsSubJob

func (*MockStatsJobManager_Expecter) GetStatsTaskState

func (_e *MockStatsJobManager_Expecter) GetStatsTaskState(originSegmentID interface{}, subJobType interface{}) *MockStatsJobManager_GetStatsTaskState_Call

GetStatsTaskState is a helper method to define mock.On call

  • originSegmentID int64
  • subJobType indexpb.StatsSubJob

func (*MockStatsJobManager_Expecter) Start

Start is a helper method to define mock.On call

func (*MockStatsJobManager_Expecter) Stop

Stop is a helper method to define mock.On call

func (*MockStatsJobManager_Expecter) SubmitStatsTask

func (_e *MockStatsJobManager_Expecter) SubmitStatsTask(originSegmentID interface{}, targetSegmentID interface{}, subJobType interface{}, canRecycle interface{}) *MockStatsJobManager_SubmitStatsTask_Call

SubmitStatsTask is a helper method to define mock.On call

  • originSegmentID int64
  • targetSegmentID int64
  • subJobType indexpb.StatsSubJob
  • canRecycle bool

type MockStatsJobManager_GetStatsTaskState_Call

type MockStatsJobManager_GetStatsTaskState_Call struct {
	*mock.Call
}

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

func (*MockStatsJobManager_GetStatsTaskState_Call) Return

func (*MockStatsJobManager_GetStatsTaskState_Call) Run

func (*MockStatsJobManager_GetStatsTaskState_Call) RunAndReturn

type MockStatsJobManager_Start_Call

type MockStatsJobManager_Start_Call struct {
	*mock.Call
}

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

func (*MockStatsJobManager_Start_Call) Return

func (*MockStatsJobManager_Start_Call) Run

func (*MockStatsJobManager_Start_Call) RunAndReturn

func (_c *MockStatsJobManager_Start_Call) RunAndReturn(run func()) *MockStatsJobManager_Start_Call

type MockStatsJobManager_Stop_Call

type MockStatsJobManager_Stop_Call struct {
	*mock.Call
}

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

func (*MockStatsJobManager_Stop_Call) Return

func (*MockStatsJobManager_Stop_Call) Run

func (*MockStatsJobManager_Stop_Call) RunAndReturn

func (_c *MockStatsJobManager_Stop_Call) RunAndReturn(run func()) *MockStatsJobManager_Stop_Call

type MockStatsJobManager_SubmitStatsTask_Call

type MockStatsJobManager_SubmitStatsTask_Call struct {
	*mock.Call
}

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

func (*MockStatsJobManager_SubmitStatsTask_Call) Return

func (*MockStatsJobManager_SubmitStatsTask_Call) Run

func (_c *MockStatsJobManager_SubmitStatsTask_Call) Run(run func(originSegmentID int64, targetSegmentID int64, subJobType indexpb.StatsSubJob, canRecycle bool)) *MockStatsJobManager_SubmitStatsTask_Call

func (*MockStatsJobManager_SubmitStatsTask_Call) RunAndReturn

type MockSubCluster

type MockSubCluster struct {
	mock.Mock
}

MockSubCluster is an autogenerated mock type for the SubCluster type

func NewMockSubCluster

func NewMockSubCluster(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSubCluster

NewMockSubCluster creates a new instance of MockSubCluster. 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 (*MockSubCluster) CheckChannelOperationProgress

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

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

func (*MockSubCluster) EXPECT

func (*MockSubCluster) NotifyChannelOperation

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

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

type MockSubCluster_CheckChannelOperationProgress_Call

type MockSubCluster_CheckChannelOperationProgress_Call struct {
	*mock.Call
}

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

func (*MockSubCluster_CheckChannelOperationProgress_Call) Run

type MockSubCluster_Expecter

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

func (*MockSubCluster_Expecter) CheckChannelOperationProgress

func (_e *MockSubCluster_Expecter) CheckChannelOperationProgress(ctx interface{}, nodeID interface{}, info interface{}) *MockSubCluster_CheckChannelOperationProgress_Call

CheckChannelOperationProgress is a helper method to define mock.On call

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

func (*MockSubCluster_Expecter) NotifyChannelOperation

func (_e *MockSubCluster_Expecter) NotifyChannelOperation(ctx interface{}, nodeID interface{}, req interface{}) *MockSubCluster_NotifyChannelOperation_Call

NotifyChannelOperation is a helper method to define mock.On call

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

type MockSubCluster_NotifyChannelOperation_Call

type MockSubCluster_NotifyChannelOperation_Call struct {
	*mock.Call
}

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

func (*MockSubCluster_NotifyChannelOperation_Call) Return

func (*MockSubCluster_NotifyChannelOperation_Call) Run

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) ManualTrigger

func (_m *MockTriggerManager) ManualTrigger(ctx context.Context, collectionID int64, clusteringCompaction bool) (int64, error)

ManualTrigger provides a mock function with given fields: ctx, collectionID, clusteringCompaction

func (*MockTriggerManager) Start

func (_m *MockTriggerManager) Start()

Start provides a mock function with given fields:

func (*MockTriggerManager) Stop

func (_m *MockTriggerManager) Stop()

Stop provides a mock function with given fields:

type MockTriggerManager_Expecter

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

func (*MockTriggerManager_Expecter) ManualTrigger

func (_e *MockTriggerManager_Expecter) ManualTrigger(ctx interface{}, collectionID interface{}, clusteringCompaction interface{}) *MockTriggerManager_ManualTrigger_Call

ManualTrigger is a helper method to define mock.On call

  • ctx context.Context
  • collectionID int64
  • clusteringCompaction bool

func (*MockTriggerManager_Expecter) Start

Start is a helper method to define mock.On call

func (*MockTriggerManager_Expecter) Stop

Stop is a helper method to define mock.On call

type MockTriggerManager_ManualTrigger_Call

type MockTriggerManager_ManualTrigger_Call struct {
	*mock.Call
}

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

func (*MockTriggerManager_ManualTrigger_Call) Return

func (*MockTriggerManager_ManualTrigger_Call) Run

func (_c *MockTriggerManager_ManualTrigger_Call) Run(run func(ctx context.Context, collectionID int64, clusteringCompaction bool)) *MockTriggerManager_ManualTrigger_Call

func (*MockTriggerManager_ManualTrigger_Call) RunAndReturn

type MockTriggerManager_Start_Call

type MockTriggerManager_Start_Call struct {
	*mock.Call
}

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

func (*MockTriggerManager_Start_Call) Return

func (*MockTriggerManager_Start_Call) Run

func (*MockTriggerManager_Start_Call) RunAndReturn

func (_c *MockTriggerManager_Start_Call) RunAndReturn(run func()) *MockTriggerManager_Start_Call

type MockTriggerManager_Stop_Call

type MockTriggerManager_Stop_Call struct {
	*mock.Call
}

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

func (*MockTriggerManager_Stop_Call) Return

func (*MockTriggerManager_Stop_Call) Run

func (*MockTriggerManager_Stop_Call) RunAndReturn

func (_c *MockTriggerManager_Stop_Call) RunAndReturn(run func()) *MockTriggerManager_Stop_Call

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 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) GetChannels

func (info *NodeChannelInfo) GetChannels() []RWChannel

func (*NodeChannelInfo) RemoveChannel

func (info *NodeChannelInfo) RemoveChannel(channelName string)

RemoveChannel removes channel from Channels.

type NodeSelector

type NodeSelector func(ID int64) bool

func WithAllNodes

func WithAllNodes() NodeSelector

func WithNodeIDs

func WithNodeIDs(IDs ...int64) NodeSelector

func WithoutBufferNode

func WithoutBufferNode() NodeSelector

func WithoutNodeIDs

func WithoutNodeIDs(IDs ...int64) NodeSelector

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 session.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

type Prioritizer

type Prioritizer func(t CompactionTask) int
var (
	DefaultPrioritizer Prioritizer = func(task CompactionTask) int {
		return int(task.GetTaskProto().GetPlanID())
	}

	LevelPrioritizer Prioritizer = func(task CompactionTask) int {
		switch task.GetTaskProto().GetType() {
		case datapb.CompactionType_Level0DeleteCompaction:
			return 1
		case datapb.CompactionType_MixCompaction:
			return 10
		case datapb.CompactionType_ClusteringCompaction:
			return 100
		default:
			return 1000
		}
	}

	MixFirstPrioritizer Prioritizer = func(task CompactionTask) int {
		switch task.GetTaskProto().GetType() {
		case datapb.CompactionType_Level0DeleteCompaction:
			return 10
		case datapb.CompactionType_MixCompaction:
			return 1
		case datapb.CompactionType_ClusteringCompaction:
			return 100
		default:
			return 1000
		}
	}
)

type PriorityQueue

type PriorityQueue[T any] []*Item[T]

A PriorityQueue implements heap.Interface and holds Items.

func (PriorityQueue[T]) Len

func (pq PriorityQueue[T]) Len() int

func (PriorityQueue[T]) Less

func (pq PriorityQueue[T]) Less(i, j int) bool

func (*PriorityQueue[T]) Pop

func (pq *PriorityQueue[T]) Pop() any

func (*PriorityQueue[T]) Push

func (pq *PriorityQueue[T]) Push(x any)

func (PriorityQueue[T]) Swap

func (pq PriorityQueue[T]) Swap(i, j int)

func (*PriorityQueue[T]) Update

func (pq *PriorityQueue[T]) Update(item *Item[T], value T, priority int)

update modifies the priority and value of an Item in the queue.

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.
	// Returns nil if the node doesn't belong to the cluster
	GetNode(nodeID int64) *NodeChannelInfo
	// GetNodesChannels returns the channels that are assigned to nodes.
	// without bufferID node
	GetNodesChannels() []*NodeChannelInfo
	// GetBufferChannelInfo gets the unassigned channels.
	GetBufferChannelInfo() *NodeChannelInfo
	// GetNodes gets all node ids in store.
	GetNodes() []int64
	// GetNodeChannels for given collection
	GetNodeChannelsByCollectionID(collectionID UniqueID) map[UniqueID][]string

	GetNodeChannelsBy(nodeSelector NodeSelector, channelSelectors ...ChannelSelector) []*NodeChannelInfo
}

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

type RWChannel

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

func NewRWChannel

func NewRWChannel(name string,
	collectionID int64,
	startPos []*commonpb.KeyDataPair,
	schema *schemapb.CollectionSchema,
	createTs uint64,
) RWChannel

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.
	AddNode(nodeID int64)
	// Delete removes nodeID and returns its channels.
	RemoveNode(nodeID int64)
	// Update applies the operations in ChannelOpSet.
	Update(op *ChannelOpSet) error

	// UpdateState is used by StateChannelStore only
	UpdateState(isSuccessful bool, channels ...RWChannel)
	// SegLegacyChannelByNode is used by StateChannelStore only
	SetLegacyChannelByNode(nodeIDs ...int64)

	HasChannel(channel string) bool
}

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

func NewChannelStoreV2

func NewChannelStoreV2(kv kv.TxnKV) RWChannelStore

type Response

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

Response response interface for verification

type SegmentFilter

type SegmentFilter interface {
	Match(segment *SegmentInfo) bool
	AddFilter(*segmentCriterion)
}

func WithChannel

func WithChannel(channel string) SegmentFilter

WithChannel WithCollection has a higher priority if both WithCollection and WithChannel are in condition together.

func WithCollection

func WithCollection(collectionID int64) SegmentFilter

type SegmentFilterFunc

type SegmentFilterFunc func(*SegmentInfo) bool

func (SegmentFilterFunc) AddFilter

func (f SegmentFilterFunc) AddFilter(criterion *segmentCriterion)

func (SegmentFilterFunc) Match

func (f SegmentFilterFunc) Match(segment *SegmentInfo) bool

type SegmentInfo

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

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

func AllocImportSegment

func AllocImportSegment(ctx context.Context,
	alloc allocator.Allocator,
	meta *meta,
	taskID int64, collectionID UniqueID,
	partitionID UniqueID,
	channelName string,
	level datapb.SegmentLevel,
) (*SegmentInfo, error)

func FilterInIndexedSegments

func FilterInIndexedSegments(handler Handler, mt *meta, skipNoIndexCollection bool, 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) IsDeltaLogExists

func (s *SegmentInfo) IsDeltaLogExists(logID int64) bool

func (*SegmentInfo) IsStatsLogExists

func (s *SegmentInfo) IsStatsLogExists(logID int64) bool

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 SetLevel

func SetLevel(level datapb.SegmentLevel) SegmentInfoOption

SetLevel is the option to set level 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) AllocNewGrowingSegment

func (s *SegmentManager) AllocNewGrowingSegment(ctx context.Context, collectionID, partitionID, segmentID UniqueID, channelName string) (*SegmentInfo, error)

AllocNewGrowingSegment allocates segment for streaming node.

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) 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

func SetTextIndexLogs

func SetTextIndexLogs(textIndexLogs map[int64]*datapb.TextIndexStats) SegmentOperator

type SegmentSealPolicy

type SegmentSealPolicy interface {
	ShouldSeal(segment *SegmentInfo, ts Timestamp) (bool, string)
}

type SegmentView

type SegmentView struct {
	ID UniqueID

	State commonpb.SegmentState
	Level datapb.SegmentLevel

	// size
	Size       float64
	ExpireSize float64
	DeltaSize  float64

	NumOfRows int64
	MaxRowNum int64

	// file numbers
	BinlogCount   int
	StatslogCount int
	DeltalogCount int

	// row count
	DeltaRowCount 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 with no compaction to. Return (notnil, true) if given segmentID can be found and has compaction to.

func (*SegmentsInfo) GetRealSegmentsForChannel

func (s *SegmentsInfo) GetRealSegmentsForChannel(channel string) []*SegmentInfo

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(filters ...SegmentFilter) []*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) SetLevel

func (s *SegmentsInfo) SetLevel(segmentID UniqueID, level datapb.SegmentLevel)

SetLevel sets level 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 segment 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

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) AllocSegment

AllocSegment alloc a new growing segment, add it into segment meta.

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) GetChannelRecoveryInfo

GetChannelRecoveryInfo get recovery channel info. Called by: StreamingNode.

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) GetServerID

func (s *Server) GetServerID() int64

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) RegisterStreamingCoordGRPCService

func (s *Server) RegisterStreamingCoordGRPCService(server *grpc.Server)

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. unflushend segmentIDs ---> L1, growing segments flushend segmentIDs ---> L1&L2, flushed segments, including indexed or unindexed dropped segmentIDs ---> dropped segments level zero segmentIDs ---> L0 segments

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 StateChannel

type StateChannel struct {
	Name            string
	CollectionID    UniqueID
	StartPositions  []*commonpb.KeyDataPair
	Schema          *schemapb.CollectionSchema
	CreateTimestamp uint64
	Info            *datapb.ChannelWatchInfo
	// contains filtered or unexported fields
}

func NewStateChannel

func NewStateChannel(ch RWChannel) *StateChannel

func NewStateChannelByWatchInfo

func NewStateChannelByWatchInfo(nodeID int64, info *datapb.ChannelWatchInfo) *StateChannel

func (*StateChannel) Assign

func (c *StateChannel) Assign(nodeID int64)

func (*StateChannel) Clone

func (c *StateChannel) Clone() *StateChannel

func (*StateChannel) GetCollectionID

func (c *StateChannel) GetCollectionID() UniqueID

func (*StateChannel) GetCreateTimestamp

func (c *StateChannel) GetCreateTimestamp() Timestamp

func (*StateChannel) GetName

func (c *StateChannel) GetName() string

func (*StateChannel) GetSchema

func (c *StateChannel) GetSchema() *schemapb.CollectionSchema

func (*StateChannel) GetStartPositions

func (c *StateChannel) GetStartPositions() []*commonpb.KeyDataPair

func (*StateChannel) GetWatchInfo

func (c *StateChannel) GetWatchInfo() *datapb.ChannelWatchInfo

func (*StateChannel) String

func (c *StateChannel) String() string

func (*StateChannel) TransitionOnFailure

func (c *StateChannel) TransitionOnFailure()

func (*StateChannel) TransitionOnSuccess

func (c *StateChannel) TransitionOnSuccess()

func (*StateChannel) UpdateWatchInfo

func (c *StateChannel) UpdateWatchInfo(info *datapb.ChannelWatchInfo)

type StateChannelStore

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

func NewStateChannelStore

func NewStateChannelStore(kv kv.TxnKV) *StateChannelStore

func (*StateChannelStore) AddNode

func (c *StateChannelStore) AddNode(nodeID int64)

func (*StateChannelStore) GetBufferChannelInfo

func (c *StateChannelStore) GetBufferChannelInfo() *NodeChannelInfo

func (*StateChannelStore) GetNode

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

func (*StateChannelStore) GetNodeChannelCount

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

func (*StateChannelStore) GetNodeChannelsBy

func (c *StateChannelStore) GetNodeChannelsBy(nodeSelector NodeSelector, channelSelectors ...ChannelSelector) []*NodeChannelInfo

func (*StateChannelStore) GetNodeChannelsByCollectionID

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

func (*StateChannelStore) GetNodes

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

func (*StateChannelStore) GetNodesChannels

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

func (*StateChannelStore) HasChannel

func (c *StateChannelStore) HasChannel(channel string) bool

func (*StateChannelStore) Reload

func (c *StateChannelStore) Reload() error

func (*StateChannelStore) RemoveNode

func (c *StateChannelStore) RemoveNode(nodeID int64)

func (*StateChannelStore) SetLegacyChannelByNode

func (c *StateChannelStore) SetLegacyChannelByNode(nodeIDs ...int64)

func (*StateChannelStore) Update

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

func (*StateChannelStore) UpdateState

func (c *StateChannelStore) UpdateState(isSuccessful bool, channels ...RWChannel)

type StatsJobManager

type StatsJobManager interface {
	Start()
	Stop()
	SubmitStatsTask(originSegmentID, targetSegmentID int64, subJobType indexpb.StatsSubJob, canRecycle bool) error
	GetStatsTaskState(originSegmentID int64, subJobType indexpb.StatsSubJob) indexpb.JobState
	DropStatsTask(originSegmentID int64, subJobType indexpb.StatsSubJob) error
}

type SubCluster

type SubCluster interface {
	NotifyChannelOperation(ctx context.Context, nodeID int64, req *datapb.ChannelOperationsRequest) error
	CheckChannelOperationProgress(ctx context.Context, nodeID int64, info *datapb.ChannelWatchInfo) (*datapb.ChannelOperationProgressResponse, error)
}

An interface sessionManager implments

type SyncSegmentsScheduler

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

func (*SyncSegmentsScheduler) Start

func (sss *SyncSegmentsScheduler) Start()

func (*SyncSegmentsScheduler) Stop

func (sss *SyncSegmentsScheduler) Stop()

func (*SyncSegmentsScheduler) SyncSegments

func (sss *SyncSegmentsScheduler) SyncSegments(ctx context.Context, collectionID, partitionID int64, channelName string, nodeID, pkFieldID int64) error

func (*SyncSegmentsScheduler) SyncSegmentsForCollections

func (sss *SyncSegmentsScheduler) SyncSegmentsForCollections(ctx context.Context)

type Task

type Task interface {
	GetTaskID() int64
	GetNodeID() int64
	ResetTask(mt *meta)
	PreCheck(ctx context.Context, dependency *taskScheduler) bool
	CheckTaskHealthy(mt *meta) bool
	SetState(state indexpb.JobState, failReason string)
	GetState() indexpb.JobState
	GetFailReason() string
	UpdateVersion(ctx context.Context, nodeID int64, meta *meta) error
	UpdateMetaBuildingState(meta *meta) error
	AssignTask(ctx context.Context, client types.IndexNodeClient) bool
	QueryResult(ctx context.Context, client types.IndexNodeClient)
	DropTaskOnWorker(ctx context.Context, client types.IndexNodeClient) bool
	SetJobInfo(meta *meta) error
	SetQueueTime(time.Time)
	GetQueueTime() time.Time
	SetStartTime(time.Time)
	GetStartTime() time.Time
	SetEndTime(time.Time)
	GetEndTime() time.Time
	GetTaskType() string
}

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 {
	Start()
	Stop()
	ManualTrigger(ctx context.Context, collectionID int64, clusteringCompaction bool) (UniqueID, error)
}

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

func UpdateStatsSegmentIDs

func UpdateStatsSegmentIDs(segmentIDs []UniqueID) 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, bm25logs []*datapb.FieldBinlog) UpdateOperator

Add binlogs in segmentInfo

func CreateL0Operator

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

func RevertSegmentLevelOperator

func RevertSegmentLevelOperator(segmentID int64) UpdateOperator

func RevertSegmentPartitionStatsVersionOperator

func RevertSegmentPartitionStatsVersionOperator(segmentID int64) UpdateOperator

func SetSegmentIsInvisible

func SetSegmentIsInvisible(segmentID int64, isInvisible bool) UpdateOperator

func UpdateAsDroppedIfEmptyWhenFlushing

func UpdateAsDroppedIfEmptyWhenFlushing(segmentID int64) UpdateOperator

UpdateAsDroppedIfEmptyWhenFlushing updates segment state to Dropped if segment is empty and in Flushing state It's used to make a empty flushing segment to be dropped directly.

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 UpdateSegmentLevelOperator

func UpdateSegmentLevelOperator(segmentID int64, level datapb.SegmentLevel) UpdateOperator

func UpdateSegmentPartitionStatsVersionOperator

func UpdateSegmentPartitionStatsVersionOperator(segmentID int64, version int64) 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