Documentation ¶
Index ¶
- Constants
- Variables
- type Broker
- type ChannelDistFilter
- type ChannelDistManager
- func (m *ChannelDistManager) GetByCollectionAndFilter(collectionID int64, filters ...ChannelDistFilter) []*DmChannel
- func (m *ChannelDistManager) GetByFilter(filters ...ChannelDistFilter) []*DmChannel
- func (m *ChannelDistManager) GetChannelDist() []*metricsinfo.DmChannel
- func (m *ChannelDistManager) GetShardLeader(replica *Replica, shard string) (int64, bool)
- func (m *ChannelDistManager) GetShardLeadersByReplica(replica *Replica) map[string]int64
- func (m *ChannelDistManager) Update(nodeID typeutil.UniqueID, channels ...*DmChannel)
- type ChannelSegDistFilter
- type Collection
- type CollectionManager
- func (m *CollectionManager) CalculateLoadPercentage(ctx context.Context, collectionID typeutil.UniqueID) int32
- func (m *CollectionManager) CalculateLoadStatus(ctx context.Context, collectionID typeutil.UniqueID) querypb.LoadStatus
- func (m *CollectionManager) Exist(ctx context.Context, collectionID typeutil.UniqueID) bool
- func (m *CollectionManager) GetAll(ctx context.Context) []int64
- func (m *CollectionManager) GetAllCollections(ctx context.Context) []*Collection
- func (m *CollectionManager) GetAllPartitions(ctx context.Context) []*Partition
- func (m *CollectionManager) GetCollection(ctx context.Context, collectionID typeutil.UniqueID) *Collection
- func (m *CollectionManager) GetFieldIndex(ctx context.Context, collectionID typeutil.UniqueID) map[int64]int64
- func (m *CollectionManager) GetLoadFields(ctx context.Context, collectionID typeutil.UniqueID) []int64
- func (m *CollectionManager) GetLoadType(ctx context.Context, collectionID typeutil.UniqueID) querypb.LoadType
- func (m *CollectionManager) GetPartition(ctx context.Context, partitionID typeutil.UniqueID) *Partition
- func (m *CollectionManager) GetPartitionLoadPercentage(ctx context.Context, partitionID typeutil.UniqueID) int32
- func (m *CollectionManager) GetPartitionsByCollection(ctx context.Context, collectionID typeutil.UniqueID) []*Partition
- func (m *CollectionManager) GetReplicaNumber(ctx context.Context, collectionID typeutil.UniqueID) int32
- func (m *CollectionManager) PutCollection(ctx context.Context, collection *Collection, partitions ...*Partition) error
- func (m *CollectionManager) PutCollectionWithoutSave(ctx context.Context, collection *Collection) error
- func (m *CollectionManager) PutPartition(ctx context.Context, partitions ...*Partition) error
- func (m *CollectionManager) PutPartitionWithoutSave(ctx context.Context, partitions ...*Partition) error
- func (m *CollectionManager) Recover(ctx context.Context, broker Broker) error
- func (m *CollectionManager) RemoveCollection(ctx context.Context, collectionID typeutil.UniqueID) error
- func (m *CollectionManager) RemovePartition(ctx context.Context, collectionID typeutil.UniqueID, ...) error
- func (m *CollectionManager) UpdateLoadPercent(ctx context.Context, partitionID int64, loadPercent int32) (int32, error)
- func (m *CollectionManager) UpdateReplicaNumber(ctx context.Context, collectionID typeutil.UniqueID, replicaNumber int32) error
- type CollectionSegDistFilter
- type CollectionTarget
- func (p *CollectionTarget) GetAllDmChannelNames() []string
- func (p *CollectionTarget) GetAllDmChannels() map[string]*DmChannel
- func (p *CollectionTarget) GetAllSegmentIDs() []int64
- func (p *CollectionTarget) GetAllSegments() map[int64]*datapb.SegmentInfo
- func (p *CollectionTarget) GetTargetVersion() int64
- func (p *CollectionTarget) IsEmpty() bool
- type CoordinatorBroker
- func (broker *CoordinatorBroker) DescribeCollection(ctx context.Context, collectionID UniqueID) (*milvuspb.DescribeCollectionResponse, error)
- func (broker *CoordinatorBroker) DescribeDatabase(ctx context.Context, dbName string) (*rootcoordpb.DescribeDatabaseResponse, error)
- func (broker *CoordinatorBroker) GetCollectionLoadInfo(ctx context.Context, collectionID UniqueID) ([]string, int64, error)
- func (broker *CoordinatorBroker) GetIndexInfo(ctx context.Context, collectionID UniqueID, segmentIDs ...UniqueID) (map[int64][]*querypb.FieldIndexInfo, error)
- func (broker *CoordinatorBroker) GetPartitions(ctx context.Context, collectionID UniqueID) ([]UniqueID, error)
- func (broker *CoordinatorBroker) GetRecoveryInfo(ctx context.Context, collectionID UniqueID, partitionID UniqueID) ([]*datapb.VchannelInfo, []*datapb.SegmentBinlogs, error)
- func (broker *CoordinatorBroker) GetRecoveryInfoV2(ctx context.Context, collectionID UniqueID, partitionIDs ...UniqueID) ([]*datapb.VchannelInfo, []*datapb.SegmentInfo, error)
- func (broker *CoordinatorBroker) GetSegmentInfo(ctx context.Context, ids ...UniqueID) ([]*datapb.SegmentInfo, error)
- func (broker *CoordinatorBroker) ListIndexes(ctx context.Context, collectionID UniqueID) ([]*indexpb.IndexInfo, error)
- type DistributionManager
- type DmChannel
- type FailedLoadCache
- type LeaderView
- type LeaderViewFilter
- func WithChannelName2LeaderView(channelName string) LeaderViewFilter
- func WithCollectionID2LeaderView(collectionID int64) LeaderViewFilter
- func WithNodeID2LeaderView(nodeID int64) LeaderViewFilter
- func WithReplica2LeaderView(replica *Replica) LeaderViewFilter
- func WithSegment2LeaderView(segmentID int64, isGrowing bool) LeaderViewFilter
- func WithServiceable() LeaderViewFilter
- type LeaderViewManager
- func (mgr *LeaderViewManager) GetByFilter(filters ...LeaderViewFilter) []*LeaderView
- func (mgr *LeaderViewManager) GetLatestShardLeaderByFilter(filters ...LeaderViewFilter) *LeaderView
- func (mgr *LeaderViewManager) GetLeaderShardView(id int64, shard string) *LeaderView
- func (mgr *LeaderViewManager) GetLeaderView() []*metricsinfo.LeaderView
- func (mgr *LeaderViewManager) SetNotifyFunc(notifyFunc NotifyDelegatorChanges)
- func (mgr *LeaderViewManager) Update(leaderID int64, views ...*LeaderView)
- type Meta
- type MockBroker
- func (_m *MockBroker) DescribeCollection(ctx context.Context, collectionID int64) (*milvuspb.DescribeCollectionResponse, error)
- func (_m *MockBroker) DescribeDatabase(ctx context.Context, dbName string) (*rootcoordpb.DescribeDatabaseResponse, error)
- func (_m *MockBroker) EXPECT() *MockBroker_Expecter
- func (_m *MockBroker) GetCollectionLoadInfo(ctx context.Context, collectionID int64) ([]string, int64, error)
- func (_m *MockBroker) GetIndexInfo(ctx context.Context, collectionID int64, segmentIDs ...int64) (map[int64][]*querypb.FieldIndexInfo, error)
- func (_m *MockBroker) GetPartitions(ctx context.Context, collectionID int64) ([]int64, error)
- func (_m *MockBroker) GetRecoveryInfo(ctx context.Context, collectionID int64, partitionID int64) ([]*datapb.VchannelInfo, []*datapb.SegmentBinlogs, error)
- func (_m *MockBroker) GetRecoveryInfoV2(ctx context.Context, collectionID int64, partitionIDs ...int64) ([]*datapb.VchannelInfo, []*datapb.SegmentInfo, error)
- func (_m *MockBroker) GetSegmentInfo(ctx context.Context, segmentID ...int64) ([]*datapb.SegmentInfo, error)
- func (_m *MockBroker) ListIndexes(ctx context.Context, collectionID int64) ([]*indexpb.IndexInfo, error)
- type MockBroker_DescribeCollection_Call
- func (_c *MockBroker_DescribeCollection_Call) Return(_a0 *milvuspb.DescribeCollectionResponse, _a1 error) *MockBroker_DescribeCollection_Call
- func (_c *MockBroker_DescribeCollection_Call) Run(run func(ctx context.Context, collectionID int64)) *MockBroker_DescribeCollection_Call
- func (_c *MockBroker_DescribeCollection_Call) RunAndReturn(run func(context.Context, int64) (*milvuspb.DescribeCollectionResponse, error)) *MockBroker_DescribeCollection_Call
- type MockBroker_DescribeDatabase_Call
- func (_c *MockBroker_DescribeDatabase_Call) Return(_a0 *rootcoordpb.DescribeDatabaseResponse, _a1 error) *MockBroker_DescribeDatabase_Call
- func (_c *MockBroker_DescribeDatabase_Call) Run(run func(ctx context.Context, dbName string)) *MockBroker_DescribeDatabase_Call
- func (_c *MockBroker_DescribeDatabase_Call) RunAndReturn(...) *MockBroker_DescribeDatabase_Call
- type MockBroker_Expecter
- func (_e *MockBroker_Expecter) DescribeCollection(ctx interface{}, collectionID interface{}) *MockBroker_DescribeCollection_Call
- func (_e *MockBroker_Expecter) DescribeDatabase(ctx interface{}, dbName interface{}) *MockBroker_DescribeDatabase_Call
- func (_e *MockBroker_Expecter) GetCollectionLoadInfo(ctx interface{}, collectionID interface{}) *MockBroker_GetCollectionLoadInfo_Call
- func (_e *MockBroker_Expecter) GetIndexInfo(ctx interface{}, collectionID interface{}, segmentIDs ...interface{}) *MockBroker_GetIndexInfo_Call
- func (_e *MockBroker_Expecter) GetPartitions(ctx interface{}, collectionID interface{}) *MockBroker_GetPartitions_Call
- func (_e *MockBroker_Expecter) GetRecoveryInfo(ctx interface{}, collectionID interface{}, partitionID interface{}) *MockBroker_GetRecoveryInfo_Call
- func (_e *MockBroker_Expecter) GetRecoveryInfoV2(ctx interface{}, collectionID interface{}, partitionIDs ...interface{}) *MockBroker_GetRecoveryInfoV2_Call
- func (_e *MockBroker_Expecter) GetSegmentInfo(ctx interface{}, segmentID ...interface{}) *MockBroker_GetSegmentInfo_Call
- func (_e *MockBroker_Expecter) ListIndexes(ctx interface{}, collectionID interface{}) *MockBroker_ListIndexes_Call
- type MockBroker_GetCollectionLoadInfo_Call
- func (_c *MockBroker_GetCollectionLoadInfo_Call) Return(_a0 []string, _a1 int64, _a2 error) *MockBroker_GetCollectionLoadInfo_Call
- func (_c *MockBroker_GetCollectionLoadInfo_Call) Run(run func(ctx context.Context, collectionID int64)) *MockBroker_GetCollectionLoadInfo_Call
- func (_c *MockBroker_GetCollectionLoadInfo_Call) RunAndReturn(run func(context.Context, int64) ([]string, int64, error)) *MockBroker_GetCollectionLoadInfo_Call
- type MockBroker_GetIndexInfo_Call
- func (_c *MockBroker_GetIndexInfo_Call) Return(_a0 map[int64][]*querypb.FieldIndexInfo, _a1 error) *MockBroker_GetIndexInfo_Call
- func (_c *MockBroker_GetIndexInfo_Call) Run(run func(ctx context.Context, collectionID int64, segmentIDs ...int64)) *MockBroker_GetIndexInfo_Call
- func (_c *MockBroker_GetIndexInfo_Call) RunAndReturn(...) *MockBroker_GetIndexInfo_Call
- type MockBroker_GetPartitions_Call
- func (_c *MockBroker_GetPartitions_Call) Return(_a0 []int64, _a1 error) *MockBroker_GetPartitions_Call
- func (_c *MockBroker_GetPartitions_Call) Run(run func(ctx context.Context, collectionID int64)) *MockBroker_GetPartitions_Call
- func (_c *MockBroker_GetPartitions_Call) RunAndReturn(run func(context.Context, int64) ([]int64, error)) *MockBroker_GetPartitions_Call
- type MockBroker_GetRecoveryInfoV2_Call
- func (_c *MockBroker_GetRecoveryInfoV2_Call) Return(_a0 []*datapb.VchannelInfo, _a1 []*datapb.SegmentInfo, _a2 error) *MockBroker_GetRecoveryInfoV2_Call
- func (_c *MockBroker_GetRecoveryInfoV2_Call) Run(run func(ctx context.Context, collectionID int64, partitionIDs ...int64)) *MockBroker_GetRecoveryInfoV2_Call
- func (_c *MockBroker_GetRecoveryInfoV2_Call) RunAndReturn(...) *MockBroker_GetRecoveryInfoV2_Call
- type MockBroker_GetRecoveryInfo_Call
- func (_c *MockBroker_GetRecoveryInfo_Call) Return(_a0 []*datapb.VchannelInfo, _a1 []*datapb.SegmentBinlogs, _a2 error) *MockBroker_GetRecoveryInfo_Call
- func (_c *MockBroker_GetRecoveryInfo_Call) Run(run func(ctx context.Context, collectionID int64, partitionID int64)) *MockBroker_GetRecoveryInfo_Call
- func (_c *MockBroker_GetRecoveryInfo_Call) RunAndReturn(...) *MockBroker_GetRecoveryInfo_Call
- type MockBroker_GetSegmentInfo_Call
- func (_c *MockBroker_GetSegmentInfo_Call) Return(_a0 []*datapb.SegmentInfo, _a1 error) *MockBroker_GetSegmentInfo_Call
- func (_c *MockBroker_GetSegmentInfo_Call) Run(run func(ctx context.Context, segmentID ...int64)) *MockBroker_GetSegmentInfo_Call
- func (_c *MockBroker_GetSegmentInfo_Call) RunAndReturn(run func(context.Context, ...int64) ([]*datapb.SegmentInfo, error)) *MockBroker_GetSegmentInfo_Call
- type MockBroker_ListIndexes_Call
- func (_c *MockBroker_ListIndexes_Call) Return(_a0 []*indexpb.IndexInfo, _a1 error) *MockBroker_ListIndexes_Call
- func (_c *MockBroker_ListIndexes_Call) Run(run func(ctx context.Context, collectionID int64)) *MockBroker_ListIndexes_Call
- func (_c *MockBroker_ListIndexes_Call) RunAndReturn(run func(context.Context, int64) ([]*indexpb.IndexInfo, error)) *MockBroker_ListIndexes_Call
- type MockTargetManager
- func (_m *MockTargetManager) CanSegmentBeMoved(ctx context.Context, collectionID int64, segmentID int64) bool
- func (_m *MockTargetManager) EXPECT() *MockTargetManager_Expecter
- func (_m *MockTargetManager) GetCollectionTargetVersion(ctx context.Context, collectionID int64, scope int32) int64
- func (_m *MockTargetManager) GetDmChannel(ctx context.Context, collectionID int64, channel string, scope int32) *DmChannel
- func (_m *MockTargetManager) GetDmChannelsByCollection(ctx context.Context, collectionID int64, scope int32) map[string]*DmChannel
- func (_m *MockTargetManager) GetDroppedSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope int32) []int64
- func (_m *MockTargetManager) GetGrowingSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope int32) typeutil.Set[int64]
- func (_m *MockTargetManager) GetGrowingSegmentsByCollection(ctx context.Context, collectionID int64, scope int32) typeutil.Set[int64]
- func (_m *MockTargetManager) GetSealedSegment(ctx context.Context, collectionID int64, id int64, scope int32) *datapb.SegmentInfo
- func (_m *MockTargetManager) GetSealedSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope int32) map[int64]*datapb.SegmentInfo
- func (_m *MockTargetManager) GetSealedSegmentsByCollection(ctx context.Context, collectionID int64, scope int32) map[int64]*datapb.SegmentInfo
- func (_m *MockTargetManager) GetSealedSegmentsByPartition(ctx context.Context, collectionID int64, partitionID int64, scope int32) map[int64]*datapb.SegmentInfo
- func (_m *MockTargetManager) GetTargetJSON(ctx context.Context, scope int32) string
- func (_m *MockTargetManager) IsCurrentTargetExist(ctx context.Context, collectionID int64, partitionID int64) bool
- func (_m *MockTargetManager) IsNextTargetExist(ctx context.Context, collectionID int64) bool
- func (_m *MockTargetManager) Recover(ctx context.Context, catalog metastore.QueryCoordCatalog) error
- func (_m *MockTargetManager) RemoveCollection(ctx context.Context, collectionID int64)
- func (_m *MockTargetManager) RemovePartition(ctx context.Context, collectionID int64, partitionIDs ...int64)
- func (_m *MockTargetManager) SaveCurrentTarget(ctx context.Context, catalog metastore.QueryCoordCatalog)
- func (_m *MockTargetManager) UpdateCollectionCurrentTarget(ctx context.Context, collectionID int64) bool
- func (_m *MockTargetManager) UpdateCollectionNextTarget(ctx context.Context, collectionID int64) error
- type MockTargetManager_CanSegmentBeMoved_Call
- func (_c *MockTargetManager_CanSegmentBeMoved_Call) Return(_a0 bool) *MockTargetManager_CanSegmentBeMoved_Call
- func (_c *MockTargetManager_CanSegmentBeMoved_Call) Run(run func(ctx context.Context, collectionID int64, segmentID int64)) *MockTargetManager_CanSegmentBeMoved_Call
- func (_c *MockTargetManager_CanSegmentBeMoved_Call) RunAndReturn(run func(context.Context, int64, int64) bool) *MockTargetManager_CanSegmentBeMoved_Call
- type MockTargetManager_Expecter
- func (_e *MockTargetManager_Expecter) CanSegmentBeMoved(ctx interface{}, collectionID interface{}, segmentID interface{}) *MockTargetManager_CanSegmentBeMoved_Call
- func (_e *MockTargetManager_Expecter) GetCollectionTargetVersion(ctx interface{}, collectionID interface{}, scope interface{}) *MockTargetManager_GetCollectionTargetVersion_Call
- func (_e *MockTargetManager_Expecter) GetDmChannel(ctx interface{}, collectionID interface{}, channel interface{}, ...) *MockTargetManager_GetDmChannel_Call
- func (_e *MockTargetManager_Expecter) GetDmChannelsByCollection(ctx interface{}, collectionID interface{}, scope interface{}) *MockTargetManager_GetDmChannelsByCollection_Call
- func (_e *MockTargetManager_Expecter) GetDroppedSegmentsByChannel(ctx interface{}, collectionID interface{}, channelName interface{}, ...) *MockTargetManager_GetDroppedSegmentsByChannel_Call
- func (_e *MockTargetManager_Expecter) GetGrowingSegmentsByChannel(ctx interface{}, collectionID interface{}, channelName interface{}, ...) *MockTargetManager_GetGrowingSegmentsByChannel_Call
- func (_e *MockTargetManager_Expecter) GetGrowingSegmentsByCollection(ctx interface{}, collectionID interface{}, scope interface{}) *MockTargetManager_GetGrowingSegmentsByCollection_Call
- func (_e *MockTargetManager_Expecter) GetSealedSegment(ctx interface{}, collectionID interface{}, id interface{}, scope interface{}) *MockTargetManager_GetSealedSegment_Call
- func (_e *MockTargetManager_Expecter) GetSealedSegmentsByChannel(ctx interface{}, collectionID interface{}, channelName interface{}, ...) *MockTargetManager_GetSealedSegmentsByChannel_Call
- func (_e *MockTargetManager_Expecter) GetSealedSegmentsByCollection(ctx interface{}, collectionID interface{}, scope interface{}) *MockTargetManager_GetSealedSegmentsByCollection_Call
- func (_e *MockTargetManager_Expecter) GetSealedSegmentsByPartition(ctx interface{}, collectionID interface{}, partitionID interface{}, ...) *MockTargetManager_GetSealedSegmentsByPartition_Call
- func (_e *MockTargetManager_Expecter) GetTargetJSON(ctx interface{}, scope interface{}) *MockTargetManager_GetTargetJSON_Call
- func (_e *MockTargetManager_Expecter) IsCurrentTargetExist(ctx interface{}, collectionID interface{}, partitionID interface{}) *MockTargetManager_IsCurrentTargetExist_Call
- func (_e *MockTargetManager_Expecter) IsNextTargetExist(ctx interface{}, collectionID interface{}) *MockTargetManager_IsNextTargetExist_Call
- func (_e *MockTargetManager_Expecter) Recover(ctx interface{}, catalog interface{}) *MockTargetManager_Recover_Call
- func (_e *MockTargetManager_Expecter) RemoveCollection(ctx interface{}, collectionID interface{}) *MockTargetManager_RemoveCollection_Call
- func (_e *MockTargetManager_Expecter) RemovePartition(ctx interface{}, collectionID interface{}, partitionIDs ...interface{}) *MockTargetManager_RemovePartition_Call
- func (_e *MockTargetManager_Expecter) SaveCurrentTarget(ctx interface{}, catalog interface{}) *MockTargetManager_SaveCurrentTarget_Call
- func (_e *MockTargetManager_Expecter) UpdateCollectionCurrentTarget(ctx interface{}, collectionID interface{}) *MockTargetManager_UpdateCollectionCurrentTarget_Call
- func (_e *MockTargetManager_Expecter) UpdateCollectionNextTarget(ctx interface{}, collectionID interface{}) *MockTargetManager_UpdateCollectionNextTarget_Call
- type MockTargetManager_GetCollectionTargetVersion_Call
- func (_c *MockTargetManager_GetCollectionTargetVersion_Call) Return(_a0 int64) *MockTargetManager_GetCollectionTargetVersion_Call
- func (_c *MockTargetManager_GetCollectionTargetVersion_Call) Run(run func(ctx context.Context, collectionID int64, scope int32)) *MockTargetManager_GetCollectionTargetVersion_Call
- func (_c *MockTargetManager_GetCollectionTargetVersion_Call) RunAndReturn(run func(context.Context, int64, int32) int64) *MockTargetManager_GetCollectionTargetVersion_Call
- type MockTargetManager_GetDmChannel_Call
- func (_c *MockTargetManager_GetDmChannel_Call) Return(_a0 *DmChannel) *MockTargetManager_GetDmChannel_Call
- func (_c *MockTargetManager_GetDmChannel_Call) Run(run func(ctx context.Context, collectionID int64, channel string, scope int32)) *MockTargetManager_GetDmChannel_Call
- func (_c *MockTargetManager_GetDmChannel_Call) RunAndReturn(run func(context.Context, int64, string, int32) *DmChannel) *MockTargetManager_GetDmChannel_Call
- type MockTargetManager_GetDmChannelsByCollection_Call
- func (_c *MockTargetManager_GetDmChannelsByCollection_Call) Return(_a0 map[string]*DmChannel) *MockTargetManager_GetDmChannelsByCollection_Call
- func (_c *MockTargetManager_GetDmChannelsByCollection_Call) Run(run func(ctx context.Context, collectionID int64, scope int32)) *MockTargetManager_GetDmChannelsByCollection_Call
- func (_c *MockTargetManager_GetDmChannelsByCollection_Call) RunAndReturn(run func(context.Context, int64, int32) map[string]*DmChannel) *MockTargetManager_GetDmChannelsByCollection_Call
- type MockTargetManager_GetDroppedSegmentsByChannel_Call
- func (_c *MockTargetManager_GetDroppedSegmentsByChannel_Call) Return(_a0 []int64) *MockTargetManager_GetDroppedSegmentsByChannel_Call
- func (_c *MockTargetManager_GetDroppedSegmentsByChannel_Call) Run(...) *MockTargetManager_GetDroppedSegmentsByChannel_Call
- func (_c *MockTargetManager_GetDroppedSegmentsByChannel_Call) RunAndReturn(run func(context.Context, int64, string, int32) []int64) *MockTargetManager_GetDroppedSegmentsByChannel_Call
- type MockTargetManager_GetGrowingSegmentsByChannel_Call
- func (_c *MockTargetManager_GetGrowingSegmentsByChannel_Call) Return(_a0 typeutil.Set[int64]) *MockTargetManager_GetGrowingSegmentsByChannel_Call
- func (_c *MockTargetManager_GetGrowingSegmentsByChannel_Call) Run(...) *MockTargetManager_GetGrowingSegmentsByChannel_Call
- func (_c *MockTargetManager_GetGrowingSegmentsByChannel_Call) RunAndReturn(run func(context.Context, int64, string, int32) typeutil.Set[int64]) *MockTargetManager_GetGrowingSegmentsByChannel_Call
- type MockTargetManager_GetGrowingSegmentsByCollection_Call
- func (_c *MockTargetManager_GetGrowingSegmentsByCollection_Call) Return(_a0 typeutil.Set[int64]) *MockTargetManager_GetGrowingSegmentsByCollection_Call
- func (_c *MockTargetManager_GetGrowingSegmentsByCollection_Call) Run(run func(ctx context.Context, collectionID int64, scope int32)) *MockTargetManager_GetGrowingSegmentsByCollection_Call
- func (_c *MockTargetManager_GetGrowingSegmentsByCollection_Call) RunAndReturn(run func(context.Context, int64, int32) typeutil.Set[int64]) *MockTargetManager_GetGrowingSegmentsByCollection_Call
- type MockTargetManager_GetSealedSegment_Call
- func (_c *MockTargetManager_GetSealedSegment_Call) Return(_a0 *datapb.SegmentInfo) *MockTargetManager_GetSealedSegment_Call
- func (_c *MockTargetManager_GetSealedSegment_Call) Run(run func(ctx context.Context, collectionID int64, id int64, scope int32)) *MockTargetManager_GetSealedSegment_Call
- func (_c *MockTargetManager_GetSealedSegment_Call) RunAndReturn(run func(context.Context, int64, int64, int32) *datapb.SegmentInfo) *MockTargetManager_GetSealedSegment_Call
- type MockTargetManager_GetSealedSegmentsByChannel_Call
- func (_c *MockTargetManager_GetSealedSegmentsByChannel_Call) Return(_a0 map[int64]*datapb.SegmentInfo) *MockTargetManager_GetSealedSegmentsByChannel_Call
- func (_c *MockTargetManager_GetSealedSegmentsByChannel_Call) Run(...) *MockTargetManager_GetSealedSegmentsByChannel_Call
- func (_c *MockTargetManager_GetSealedSegmentsByChannel_Call) RunAndReturn(run func(context.Context, int64, string, int32) map[int64]*datapb.SegmentInfo) *MockTargetManager_GetSealedSegmentsByChannel_Call
- type MockTargetManager_GetSealedSegmentsByCollection_Call
- func (_c *MockTargetManager_GetSealedSegmentsByCollection_Call) Return(_a0 map[int64]*datapb.SegmentInfo) *MockTargetManager_GetSealedSegmentsByCollection_Call
- func (_c *MockTargetManager_GetSealedSegmentsByCollection_Call) Run(run func(ctx context.Context, collectionID int64, scope int32)) *MockTargetManager_GetSealedSegmentsByCollection_Call
- func (_c *MockTargetManager_GetSealedSegmentsByCollection_Call) RunAndReturn(run func(context.Context, int64, int32) map[int64]*datapb.SegmentInfo) *MockTargetManager_GetSealedSegmentsByCollection_Call
- type MockTargetManager_GetSealedSegmentsByPartition_Call
- func (_c *MockTargetManager_GetSealedSegmentsByPartition_Call) Return(_a0 map[int64]*datapb.SegmentInfo) *MockTargetManager_GetSealedSegmentsByPartition_Call
- func (_c *MockTargetManager_GetSealedSegmentsByPartition_Call) Run(...) *MockTargetManager_GetSealedSegmentsByPartition_Call
- func (_c *MockTargetManager_GetSealedSegmentsByPartition_Call) RunAndReturn(run func(context.Context, int64, int64, int32) map[int64]*datapb.SegmentInfo) *MockTargetManager_GetSealedSegmentsByPartition_Call
- type MockTargetManager_GetTargetJSON_Call
- func (_c *MockTargetManager_GetTargetJSON_Call) Return(_a0 string) *MockTargetManager_GetTargetJSON_Call
- func (_c *MockTargetManager_GetTargetJSON_Call) Run(run func(ctx context.Context, scope int32)) *MockTargetManager_GetTargetJSON_Call
- func (_c *MockTargetManager_GetTargetJSON_Call) RunAndReturn(run func(context.Context, int32) string) *MockTargetManager_GetTargetJSON_Call
- type MockTargetManager_IsCurrentTargetExist_Call
- func (_c *MockTargetManager_IsCurrentTargetExist_Call) Return(_a0 bool) *MockTargetManager_IsCurrentTargetExist_Call
- func (_c *MockTargetManager_IsCurrentTargetExist_Call) Run(run func(ctx context.Context, collectionID int64, partitionID int64)) *MockTargetManager_IsCurrentTargetExist_Call
- func (_c *MockTargetManager_IsCurrentTargetExist_Call) RunAndReturn(run func(context.Context, int64, int64) bool) *MockTargetManager_IsCurrentTargetExist_Call
- type MockTargetManager_IsNextTargetExist_Call
- func (_c *MockTargetManager_IsNextTargetExist_Call) Return(_a0 bool) *MockTargetManager_IsNextTargetExist_Call
- func (_c *MockTargetManager_IsNextTargetExist_Call) Run(run func(ctx context.Context, collectionID int64)) *MockTargetManager_IsNextTargetExist_Call
- func (_c *MockTargetManager_IsNextTargetExist_Call) RunAndReturn(run func(context.Context, int64) bool) *MockTargetManager_IsNextTargetExist_Call
- type MockTargetManager_Recover_Call
- func (_c *MockTargetManager_Recover_Call) Return(_a0 error) *MockTargetManager_Recover_Call
- func (_c *MockTargetManager_Recover_Call) Run(run func(ctx context.Context, catalog metastore.QueryCoordCatalog)) *MockTargetManager_Recover_Call
- func (_c *MockTargetManager_Recover_Call) RunAndReturn(run func(context.Context, metastore.QueryCoordCatalog) error) *MockTargetManager_Recover_Call
- type MockTargetManager_RemoveCollection_Call
- func (_c *MockTargetManager_RemoveCollection_Call) Return() *MockTargetManager_RemoveCollection_Call
- func (_c *MockTargetManager_RemoveCollection_Call) Run(run func(ctx context.Context, collectionID int64)) *MockTargetManager_RemoveCollection_Call
- func (_c *MockTargetManager_RemoveCollection_Call) RunAndReturn(run func(context.Context, int64)) *MockTargetManager_RemoveCollection_Call
- type MockTargetManager_RemovePartition_Call
- func (_c *MockTargetManager_RemovePartition_Call) Return() *MockTargetManager_RemovePartition_Call
- func (_c *MockTargetManager_RemovePartition_Call) Run(run func(ctx context.Context, collectionID int64, partitionIDs ...int64)) *MockTargetManager_RemovePartition_Call
- func (_c *MockTargetManager_RemovePartition_Call) RunAndReturn(run func(context.Context, int64, ...int64)) *MockTargetManager_RemovePartition_Call
- type MockTargetManager_SaveCurrentTarget_Call
- func (_c *MockTargetManager_SaveCurrentTarget_Call) Return() *MockTargetManager_SaveCurrentTarget_Call
- func (_c *MockTargetManager_SaveCurrentTarget_Call) Run(run func(ctx context.Context, catalog metastore.QueryCoordCatalog)) *MockTargetManager_SaveCurrentTarget_Call
- func (_c *MockTargetManager_SaveCurrentTarget_Call) RunAndReturn(run func(context.Context, metastore.QueryCoordCatalog)) *MockTargetManager_SaveCurrentTarget_Call
- type MockTargetManager_UpdateCollectionCurrentTarget_Call
- func (_c *MockTargetManager_UpdateCollectionCurrentTarget_Call) Return(_a0 bool) *MockTargetManager_UpdateCollectionCurrentTarget_Call
- func (_c *MockTargetManager_UpdateCollectionCurrentTarget_Call) Run(run func(ctx context.Context, collectionID int64)) *MockTargetManager_UpdateCollectionCurrentTarget_Call
- func (_c *MockTargetManager_UpdateCollectionCurrentTarget_Call) RunAndReturn(run func(context.Context, int64) bool) *MockTargetManager_UpdateCollectionCurrentTarget_Call
- type MockTargetManager_UpdateCollectionNextTarget_Call
- func (_c *MockTargetManager_UpdateCollectionNextTarget_Call) Return(_a0 error) *MockTargetManager_UpdateCollectionNextTarget_Call
- func (_c *MockTargetManager_UpdateCollectionNextTarget_Call) Run(run func(ctx context.Context, collectionID int64)) *MockTargetManager_UpdateCollectionNextTarget_Call
- func (_c *MockTargetManager_UpdateCollectionNextTarget_Call) RunAndReturn(run func(context.Context, int64) error) *MockTargetManager_UpdateCollectionNextTarget_Call
- type NodeSegDistFilter
- type NotifyDelegatorChanges
- type Partition
- type Replica
- func (replica *Replica) AddRWNode(nodes ...int64)deprecated
- func (replica *Replica) ContainRONode(node int64) bool
- func (replica *Replica) ContainRWNode(node int64) bool
- func (replica *Replica) Contains(node int64) bool
- func (replica *Replica) CopyForWrite() *mutableReplica
- func (replica *Replica) GetChannelRWNodes(channelName string) []int64
- func (replica *Replica) GetCollectionID() typeutil.UniqueID
- func (replica *Replica) GetID() typeutil.UniqueID
- func (replica *Replica) GetNodes() []int64
- func (replica *Replica) GetRONodes() []int64
- func (replica *Replica) GetRWNodes() []int64
- func (replica *Replica) GetResourceGroup() string
- func (replica *Replica) NodesCount() int
- func (replica *Replica) RONodesCount() int
- func (replica *Replica) RWNodesCount() int
- func (replica *Replica) RangeOverRONodes(f func(node int64) bool)
- func (replica *Replica) RangeOverRWNodes(f func(node int64) bool)
- type ReplicaManager
- func (m *ReplicaManager) Get(ctx context.Context, id typeutil.UniqueID) *Replica
- func (m *ReplicaManager) GetByCollection(ctx context.Context, collectionID typeutil.UniqueID) []*Replica
- func (m *ReplicaManager) GetByCollectionAndNode(ctx context.Context, collectionID, nodeID typeutil.UniqueID) *Replica
- func (m *ReplicaManager) GetByNode(ctx context.Context, nodeID typeutil.UniqueID) []*Replica
- func (m *ReplicaManager) GetByResourceGroup(ctx context.Context, rgName string) []*Replica
- func (m *ReplicaManager) GetReplicasJSON(ctx context.Context) string
- func (m *ReplicaManager) GetResourceGroupByCollection(ctx context.Context, collection typeutil.UniqueID) typeutil.Set[string]
- func (m *ReplicaManager) MoveReplica(ctx context.Context, dstRGName string, toMove []*Replica) error
- func (m *ReplicaManager) Put(ctx context.Context, replicas ...*Replica) errordeprecated
- func (m *ReplicaManager) Recover(ctx context.Context, collections []int64) error
- func (m *ReplicaManager) RecoverNodesInCollection(ctx context.Context, collectionID typeutil.UniqueID, ...) error
- func (m *ReplicaManager) RemoveCollection(ctx context.Context, collectionID typeutil.UniqueID) error
- func (m *ReplicaManager) RemoveNode(ctx context.Context, replicaID typeutil.UniqueID, nodes ...typeutil.UniqueID) error
- func (m *ReplicaManager) RemoveReplicas(ctx context.Context, collectionID typeutil.UniqueID, ...) error
- func (m *ReplicaManager) Spawn(ctx context.Context, collection int64, replicaNumInRG map[string]int, ...) ([]*Replica, error)
- func (m *ReplicaManager) TransferReplica(ctx context.Context, collectionID typeutil.UniqueID, srcRGName string, ...) error
- type ReplicaSegDistFilter
- type ResourceGroup
- func (rg *ResourceGroup) AcceptNode(nodeID int64) bool
- func (rg *ResourceGroup) ContainNode(id int64) bool
- func (rg *ResourceGroup) CopyForWrite() *mutableResourceGroup
- func (rg *ResourceGroup) GetCapacity() int
- func (rg *ResourceGroup) GetConfig() *rgpb.ResourceGroupConfig
- func (rg *ResourceGroup) GetConfigCloned() *rgpb.ResourceGroupConfig
- func (rg *ResourceGroup) GetMeta() *querypb.ResourceGroup
- func (rg *ResourceGroup) GetName() string
- func (rg *ResourceGroup) GetNodes() []int64
- func (rg *ResourceGroup) HasFrom(rgName string) bool
- func (rg *ResourceGroup) HasTo(rgName string) bool
- func (rg *ResourceGroup) MeetRequirement() error
- func (rg *ResourceGroup) MissingNumOfNodes() int
- func (rg *ResourceGroup) NodeNum() int
- func (rg *ResourceGroup) OversizedNumOfNodes() int
- func (rg *ResourceGroup) ReachLimitNumOfNodes() int
- func (rg *ResourceGroup) RedundantNumOfNodes() int
- func (rg *ResourceGroup) SelectNodeForRG(targetRG *ResourceGroup) int64
- func (rg *ResourceGroup) Snapshot() *ResourceGroup
- type ResourceManager
- func (rm *ResourceManager) AddResourceGroup(ctx context.Context, rgName string, cfg *rgpb.ResourceGroupConfig) error
- func (rm *ResourceManager) AssignPendingIncomingNode(ctx context.Context)
- func (rm *ResourceManager) AutoRecoverResourceGroup(ctx context.Context, rgName string) error
- func (rm *ResourceManager) CheckIncomingNodeNum(ctx context.Context) int
- func (rm *ResourceManager) ContainResourceGroup(ctx context.Context, rgName string) bool
- func (rm *ResourceManager) ContainsNode(ctx context.Context, rgName string, node int64) bool
- func (rm *ResourceManager) GetNodes(ctx context.Context, rgName string) ([]int64, error)
- func (rm *ResourceManager) GetNodesOfMultiRG(ctx context.Context, rgName []string) (map[string]typeutil.UniqueSet, error)
- func (rm *ResourceManager) GetOutgoingNodeNumByReplica(ctx context.Context, replica *Replica) map[string]int32
- func (rm *ResourceManager) GetResourceGroup(ctx context.Context, rgName string) *ResourceGroup
- func (rm *ResourceManager) GetResourceGroupsJSON(ctx context.Context) string
- func (rm *ResourceManager) HandleNodeDown(ctx context.Context, node int64)
- func (rm *ResourceManager) HandleNodeStopping(ctx context.Context, node int64)
- func (rm *ResourceManager) HandleNodeUp(ctx context.Context, node int64)
- func (rm *ResourceManager) ListResourceGroups(ctx context.Context) []string
- func (rm *ResourceManager) ListenNodeChanged(ctx context.Context) *syncutil.VersionedListener
- func (rm *ResourceManager) ListenResourceGroupChanged(ctx context.Context) *syncutil.VersionedListener
- func (rm *ResourceManager) MeetRequirement(ctx context.Context, rgName string) error
- func (rm *ResourceManager) Recover(ctx context.Context) error
- func (rm *ResourceManager) RemoveResourceGroup(ctx context.Context, rgName string) error
- func (rm *ResourceManager) TransferNode(ctx context.Context, sourceRGName string, targetRGName string, nodeNum int) error
- func (rm *ResourceManager) UpdateResourceGroups(ctx context.Context, rgs map[string]*rgpb.ResourceGroupConfig) error
- func (rm *ResourceManager) VerifyNodeCount(ctx context.Context, requiredNodeCount map[string]int) error
- type Segment
- type SegmentDistFilter
- type SegmentDistFilterFunc
- type SegmentDistManager
- type TargetManager
- func (mgr *TargetManager) CanSegmentBeMoved(ctx context.Context, collectionID, segmentID int64) bool
- func (mgr *TargetManager) GetCollectionTargetVersion(ctx context.Context, collectionID int64, scope TargetScope) int64
- func (mgr *TargetManager) GetDmChannel(ctx context.Context, collectionID int64, channel string, scope TargetScope) *DmChannel
- func (mgr *TargetManager) GetDmChannelsByCollection(ctx context.Context, collectionID int64, scope TargetScope) map[string]*DmChannel
- func (mgr *TargetManager) GetDroppedSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope TargetScope) []int64
- func (mgr *TargetManager) GetGrowingSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope TargetScope) typeutil.UniqueSet
- func (mgr *TargetManager) GetGrowingSegmentsByCollection(ctx context.Context, collectionID int64, scope TargetScope) typeutil.UniqueSet
- func (mgr *TargetManager) GetSealedSegment(ctx context.Context, collectionID int64, id int64, scope TargetScope) *datapb.SegmentInfo
- func (mgr *TargetManager) GetSealedSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope TargetScope) map[int64]*datapb.SegmentInfo
- func (mgr *TargetManager) GetSealedSegmentsByCollection(ctx context.Context, collectionID int64, scope TargetScope) map[int64]*datapb.SegmentInfo
- func (mgr *TargetManager) GetSealedSegmentsByPartition(ctx context.Context, collectionID int64, partitionID int64, scope TargetScope) map[int64]*datapb.SegmentInfo
- func (mgr *TargetManager) GetTargetJSON(ctx context.Context, scope TargetScope) string
- func (mgr *TargetManager) IsCurrentTargetExist(ctx context.Context, collectionID int64, partitionID int64) bool
- func (mgr *TargetManager) IsNextTargetExist(ctx context.Context, collectionID int64) bool
- func (mgr *TargetManager) Recover(ctx context.Context, catalog metastore.QueryCoordCatalog) error
- func (mgr *TargetManager) RemoveCollection(ctx context.Context, collectionID int64)
- func (mgr *TargetManager) RemovePartition(ctx context.Context, collectionID int64, partitionIDs ...int64)
- func (mgr *TargetManager) SaveCurrentTarget(ctx context.Context, catalog metastore.QueryCoordCatalog)
- func (mgr *TargetManager) UpdateCollectionCurrentTarget(ctx context.Context, collectionID int64) bool
- func (mgr *TargetManager) UpdateCollectionNextTarget(ctx context.Context, collectionID int64) error
- type TargetManagerInterface
- type TargetScope
Constants ¶
const ( RoundRobinBalancerName = "RoundRobinBalancer" RowCountBasedBalancerName = "RowCountBasedBalancer" ScoreBasedBalancerName = "ScoreBasedBalancer" MultiTargetBalancerName = "MultipleTargetBalancer" ChannelLevelScoreBalancerName = "ChannelLevelScoreBalancer" )
Variables ¶
var (
DefaultResourceGroupName = "__default_resource_group"
)
var ErrNodeNotEnough = errors.New("nodes not enough")
var NilReplica = newReplica(&querypb.Replica{
ID: -1,
})
NilReplica is used to represent a nil replica.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker interface { DescribeCollection(ctx context.Context, collectionID UniqueID) (*milvuspb.DescribeCollectionResponse, error) GetPartitions(ctx context.Context, collectionID UniqueID) ([]UniqueID, error) GetRecoveryInfo(ctx context.Context, collectionID UniqueID, partitionID UniqueID) ([]*datapb.VchannelInfo, []*datapb.SegmentBinlogs, error) ListIndexes(ctx context.Context, collectionID UniqueID) ([]*indexpb.IndexInfo, error) GetSegmentInfo(ctx context.Context, segmentID ...UniqueID) ([]*datapb.SegmentInfo, error) GetIndexInfo(ctx context.Context, collectionID UniqueID, segmentIDs ...UniqueID) (map[int64][]*querypb.FieldIndexInfo, error) GetRecoveryInfoV2(ctx context.Context, collectionID UniqueID, partitionIDs ...UniqueID) ([]*datapb.VchannelInfo, []*datapb.SegmentInfo, error) DescribeDatabase(ctx context.Context, dbName string) (*rootcoordpb.DescribeDatabaseResponse, error) GetCollectionLoadInfo(ctx context.Context, collectionID UniqueID) ([]string, int64, error) }
type ChannelDistFilter ¶
func WithChannelName2Channel ¶
func WithChannelName2Channel(channelName string) ChannelDistFilter
func WithCollectionID2Channel ¶
func WithCollectionID2Channel(collectionID int64) ChannelDistFilter
func WithNodeID2Channel ¶
func WithNodeID2Channel(nodeID int64) ChannelDistFilter
func WithReplica2Channel ¶
func WithReplica2Channel(replica *Replica) ChannelDistFilter
type ChannelDistManager ¶
type ChannelDistManager struct {
// contains filtered or unexported fields
}
func NewChannelDistManager ¶
func NewChannelDistManager() *ChannelDistManager
func (*ChannelDistManager) GetByCollectionAndFilter ¶
func (m *ChannelDistManager) GetByCollectionAndFilter(collectionID int64, filters ...ChannelDistFilter) []*DmChannel
func (*ChannelDistManager) GetByFilter ¶
func (m *ChannelDistManager) GetByFilter(filters ...ChannelDistFilter) []*DmChannel
return all channels in list which match all given filters
func (*ChannelDistManager) GetChannelDist ¶
func (m *ChannelDistManager) GetChannelDist() []*metricsinfo.DmChannel
func (*ChannelDistManager) GetShardLeader ¶
func (m *ChannelDistManager) GetShardLeader(replica *Replica, shard string) (int64, bool)
todo by liuwei: should consider the case of duplicate leader exists GetShardLeader returns the node whthin the given replicaNodes and subscribing the given shard, returns (0, false) if not found.
func (*ChannelDistManager) GetShardLeadersByReplica ¶
func (m *ChannelDistManager) GetShardLeadersByReplica(replica *Replica) map[string]int64
todo by liuwei: should consider the case of duplicate leader exists
type ChannelSegDistFilter ¶
type ChannelSegDistFilter string
func (ChannelSegDistFilter) AddFilter ¶
func (f ChannelSegDistFilter) AddFilter(filter *segDistCriterion)
func (ChannelSegDistFilter) Match ¶
func (f ChannelSegDistFilter) Match(s *Segment) bool
type Collection ¶
type Collection struct { *querypb.CollectionLoadInfo LoadPercentage int32 CreatedAt time.Time UpdatedAt time.Time LoadSpan trace.Span // contains filtered or unexported fields }
func (*Collection) Clone ¶
func (collection *Collection) Clone() *Collection
func (*Collection) IsRefreshed ¶
func (collection *Collection) IsRefreshed() bool
func (*Collection) SetRefreshNotifier ¶
func (collection *Collection) SetRefreshNotifier(notifier chan struct{})
type CollectionManager ¶
type CollectionManager struct {
// contains filtered or unexported fields
}
func NewCollectionManager ¶
func NewCollectionManager(catalog metastore.QueryCoordCatalog) *CollectionManager
func (*CollectionManager) CalculateLoadPercentage ¶
func (m *CollectionManager) CalculateLoadPercentage(ctx context.Context, collectionID typeutil.UniqueID) int32
CalculateLoadPercentage checks if collection is currently fully loaded.
func (*CollectionManager) CalculateLoadStatus ¶
func (m *CollectionManager) CalculateLoadStatus(ctx context.Context, collectionID typeutil.UniqueID) querypb.LoadStatus
func (*CollectionManager) GetAll ¶
func (m *CollectionManager) GetAll(ctx context.Context) []int64
GetAll returns the collection ID of all loaded collections
func (*CollectionManager) GetAllCollections ¶
func (m *CollectionManager) GetAllCollections(ctx context.Context) []*Collection
func (*CollectionManager) GetAllPartitions ¶
func (m *CollectionManager) GetAllPartitions(ctx context.Context) []*Partition
func (*CollectionManager) GetCollection ¶
func (m *CollectionManager) GetCollection(ctx context.Context, collectionID typeutil.UniqueID) *Collection
func (*CollectionManager) GetFieldIndex ¶
func (*CollectionManager) GetLoadFields ¶
func (*CollectionManager) GetLoadType ¶
func (*CollectionManager) GetPartition ¶
func (*CollectionManager) GetPartitionLoadPercentage ¶
func (*CollectionManager) GetPartitionsByCollection ¶
func (*CollectionManager) GetReplicaNumber ¶
func (*CollectionManager) PutCollection ¶
func (m *CollectionManager) PutCollection(ctx context.Context, collection *Collection, partitions ...*Partition) error
func (*CollectionManager) PutCollectionWithoutSave ¶
func (m *CollectionManager) PutCollectionWithoutSave(ctx context.Context, collection *Collection) error
func (*CollectionManager) PutPartition ¶
func (m *CollectionManager) PutPartition(ctx context.Context, partitions ...*Partition) error
func (*CollectionManager) PutPartitionWithoutSave ¶
func (m *CollectionManager) PutPartitionWithoutSave(ctx context.Context, partitions ...*Partition) error
func (*CollectionManager) Recover ¶
func (m *CollectionManager) Recover(ctx context.Context, broker Broker) error
Recover recovers collections from kv store, panics if failed
func (*CollectionManager) RemoveCollection ¶
func (m *CollectionManager) RemoveCollection(ctx context.Context, collectionID typeutil.UniqueID) error
RemoveCollection removes collection and its partitions.
func (*CollectionManager) RemovePartition ¶
func (*CollectionManager) UpdateLoadPercent ¶
func (*CollectionManager) UpdateReplicaNumber ¶
type CollectionSegDistFilter ¶
type CollectionSegDistFilter int64
func (CollectionSegDistFilter) AddFilter ¶
func (f CollectionSegDistFilter) AddFilter(filter *segDistCriterion)
func (CollectionSegDistFilter) Match ¶
func (f CollectionSegDistFilter) Match(s *Segment) bool
type CollectionTarget ¶
type CollectionTarget struct {
// contains filtered or unexported fields
}
CollectionTarget collection target is immutable,
func FromPbCollectionTarget ¶
func FromPbCollectionTarget(target *querypb.CollectionTarget) *CollectionTarget
func NewCollectionTarget ¶
func NewCollectionTarget(segments map[int64]*datapb.SegmentInfo, dmChannels map[string]*DmChannel, partitionIDs []int64) *CollectionTarget
func (*CollectionTarget) GetAllDmChannelNames ¶
func (p *CollectionTarget) GetAllDmChannelNames() []string
func (*CollectionTarget) GetAllDmChannels ¶
func (p *CollectionTarget) GetAllDmChannels() map[string]*DmChannel
func (*CollectionTarget) GetAllSegmentIDs ¶
func (p *CollectionTarget) GetAllSegmentIDs() []int64
func (*CollectionTarget) GetAllSegments ¶
func (p *CollectionTarget) GetAllSegments() map[int64]*datapb.SegmentInfo
func (*CollectionTarget) GetTargetVersion ¶
func (p *CollectionTarget) GetTargetVersion() int64
func (*CollectionTarget) IsEmpty ¶
func (p *CollectionTarget) IsEmpty() bool
type CoordinatorBroker ¶
type CoordinatorBroker struct {
// contains filtered or unexported fields
}
func NewCoordinatorBroker ¶
func NewCoordinatorBroker( dataCoord types.DataCoordClient, rootCoord types.RootCoordClient, ) *CoordinatorBroker
func (*CoordinatorBroker) DescribeCollection ¶
func (broker *CoordinatorBroker) DescribeCollection(ctx context.Context, collectionID UniqueID) (*milvuspb.DescribeCollectionResponse, error)
func (*CoordinatorBroker) DescribeDatabase ¶
func (broker *CoordinatorBroker) DescribeDatabase(ctx context.Context, dbName string) (*rootcoordpb.DescribeDatabaseResponse, error)
func (*CoordinatorBroker) GetCollectionLoadInfo ¶
func (broker *CoordinatorBroker) GetCollectionLoadInfo(ctx context.Context, collectionID UniqueID) ([]string, int64, error)
try to get database level replica_num and resource groups, return (resource_groups, replica_num, error)
func (*CoordinatorBroker) GetIndexInfo ¶
func (broker *CoordinatorBroker) GetIndexInfo(ctx context.Context, collectionID UniqueID, segmentIDs ...UniqueID) (map[int64][]*querypb.FieldIndexInfo, error)
func (*CoordinatorBroker) GetPartitions ¶
func (broker *CoordinatorBroker) GetPartitions(ctx context.Context, collectionID UniqueID) ([]UniqueID, error)
func (*CoordinatorBroker) GetRecoveryInfo ¶
func (broker *CoordinatorBroker) GetRecoveryInfo(ctx context.Context, collectionID UniqueID, partitionID UniqueID) ([]*datapb.VchannelInfo, []*datapb.SegmentBinlogs, error)
func (*CoordinatorBroker) GetRecoveryInfoV2 ¶
func (broker *CoordinatorBroker) GetRecoveryInfoV2(ctx context.Context, collectionID UniqueID, partitionIDs ...UniqueID) ([]*datapb.VchannelInfo, []*datapb.SegmentInfo, error)
func (*CoordinatorBroker) GetSegmentInfo ¶
func (broker *CoordinatorBroker) GetSegmentInfo(ctx context.Context, ids ...UniqueID) ([]*datapb.SegmentInfo, error)
func (*CoordinatorBroker) ListIndexes ¶
type DistributionManager ¶
type DistributionManager struct { *SegmentDistManager *ChannelDistManager *LeaderViewManager }
func NewDistributionManager ¶
func NewDistributionManager() *DistributionManager
func (*DistributionManager) GetDistributionJSON ¶
func (dm *DistributionManager) GetDistributionJSON() string
GetDistributionJSON returns a JSON representation of the current distribution state. It includes segments, DM channels, and leader views. If there are no segments, channels, or leader views, it returns an empty string. In case of an error during JSON marshaling, it returns the error.
type DmChannel ¶
type DmChannel struct { *datapb.VchannelInfo Node int64 Version int64 }
func DmChannelFromVChannel ¶
func DmChannelFromVChannel(channel *datapb.VchannelInfo) *DmChannel
type FailedLoadCache ¶
type FailedLoadCache struct {
// contains filtered or unexported fields
}
var GlobalFailedLoadCache *FailedLoadCache
func NewFailedLoadCache ¶
func NewFailedLoadCache() *FailedLoadCache
func (*FailedLoadCache) Get ¶
func (l *FailedLoadCache) Get(collectionID int64) error
func (*FailedLoadCache) Put ¶
func (l *FailedLoadCache) Put(collectionID int64, err error)
func (*FailedLoadCache) Remove ¶
func (l *FailedLoadCache) Remove(collectionID int64)
func (*FailedLoadCache) TryExpire ¶
func (l *FailedLoadCache) TryExpire()
type LeaderView ¶
type LeaderView struct { ID int64 CollectionID int64 Channel string Version int64 Segments map[int64]*querypb.SegmentDist GrowingSegments map[int64]*Segment TargetVersion int64 NumOfGrowingRows int64 PartitionStatsVersions map[int64]int64 UnServiceableError error }
func (*LeaderView) Clone ¶
func (view *LeaderView) Clone() *LeaderView
type LeaderViewFilter ¶
type LeaderViewFilter interface { Match(*LeaderView) bool AddFilter(*lvCriterion) }
func WithChannelName2LeaderView ¶
func WithChannelName2LeaderView(channelName string) LeaderViewFilter
func WithCollectionID2LeaderView ¶
func WithCollectionID2LeaderView(collectionID int64) LeaderViewFilter
func WithNodeID2LeaderView ¶
func WithNodeID2LeaderView(nodeID int64) LeaderViewFilter
func WithReplica2LeaderView ¶
func WithReplica2LeaderView(replica *Replica) LeaderViewFilter
func WithSegment2LeaderView ¶
func WithSegment2LeaderView(segmentID int64, isGrowing bool) LeaderViewFilter
func WithServiceable ¶
func WithServiceable() LeaderViewFilter
type LeaderViewManager ¶
type LeaderViewManager struct {
// contains filtered or unexported fields
}
func NewLeaderViewManager ¶
func NewLeaderViewManager() *LeaderViewManager
func (*LeaderViewManager) GetByFilter ¶
func (mgr *LeaderViewManager) GetByFilter(filters ...LeaderViewFilter) []*LeaderView
func (*LeaderViewManager) GetLatestShardLeaderByFilter ¶
func (mgr *LeaderViewManager) GetLatestShardLeaderByFilter(filters ...LeaderViewFilter) *LeaderView
func (*LeaderViewManager) GetLeaderShardView ¶
func (mgr *LeaderViewManager) GetLeaderShardView(id int64, shard string) *LeaderView
func (*LeaderViewManager) GetLeaderView ¶
func (mgr *LeaderViewManager) GetLeaderView() []*metricsinfo.LeaderView
GetLeaderView returns a slice of LeaderView objects, each representing the state of a leader node. It traverses the views map, converts each LeaderView to a metricsinfo.LeaderView, and collects them into a slice. The method locks the views map for reading to ensure thread safety.
func (*LeaderViewManager) SetNotifyFunc ¶
func (mgr *LeaderViewManager) SetNotifyFunc(notifyFunc NotifyDelegatorChanges)
func (*LeaderViewManager) Update ¶
func (mgr *LeaderViewManager) Update(leaderID int64, views ...*LeaderView)
Update updates the leader's views, all views have to be with the same leader ID
type Meta ¶
type Meta struct { *CollectionManager *ReplicaManager *ResourceManager }
func NewMeta ¶
func NewMeta( idAllocator func() (int64, error), catalog metastore.QueryCoordCatalog, nodeMgr *session.NodeManager, ) *Meta
type MockBroker ¶
MockBroker is an autogenerated mock type for the Broker type
func NewMockBroker ¶
func NewMockBroker(t interface { mock.TestingT Cleanup(func()) }) *MockBroker
NewMockBroker creates a new instance of MockBroker. 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 (*MockBroker) DescribeCollection ¶
func (_m *MockBroker) DescribeCollection(ctx context.Context, collectionID int64) (*milvuspb.DescribeCollectionResponse, error)
DescribeCollection provides a mock function with given fields: ctx, collectionID
func (*MockBroker) DescribeDatabase ¶
func (_m *MockBroker) DescribeDatabase(ctx context.Context, dbName string) (*rootcoordpb.DescribeDatabaseResponse, error)
DescribeDatabase provides a mock function with given fields: ctx, dbName
func (*MockBroker) EXPECT ¶
func (_m *MockBroker) EXPECT() *MockBroker_Expecter
func (*MockBroker) GetCollectionLoadInfo ¶
func (_m *MockBroker) GetCollectionLoadInfo(ctx context.Context, collectionID int64) ([]string, int64, error)
GetCollectionLoadInfo provides a mock function with given fields: ctx, collectionID
func (*MockBroker) GetIndexInfo ¶
func (_m *MockBroker) GetIndexInfo(ctx context.Context, collectionID int64, segmentIDs ...int64) (map[int64][]*querypb.FieldIndexInfo, error)
GetIndexInfo provides a mock function with given fields: ctx, collectionID, segmentIDs
func (*MockBroker) GetPartitions ¶
GetPartitions provides a mock function with given fields: ctx, collectionID
func (*MockBroker) GetRecoveryInfo ¶
func (_m *MockBroker) GetRecoveryInfo(ctx context.Context, collectionID int64, partitionID int64) ([]*datapb.VchannelInfo, []*datapb.SegmentBinlogs, error)
GetRecoveryInfo provides a mock function with given fields: ctx, collectionID, partitionID
func (*MockBroker) GetRecoveryInfoV2 ¶
func (_m *MockBroker) GetRecoveryInfoV2(ctx context.Context, collectionID int64, partitionIDs ...int64) ([]*datapb.VchannelInfo, []*datapb.SegmentInfo, error)
GetRecoveryInfoV2 provides a mock function with given fields: ctx, collectionID, partitionIDs
func (*MockBroker) GetSegmentInfo ¶
func (_m *MockBroker) GetSegmentInfo(ctx context.Context, segmentID ...int64) ([]*datapb.SegmentInfo, error)
GetSegmentInfo provides a mock function with given fields: ctx, segmentID
func (*MockBroker) ListIndexes ¶
func (_m *MockBroker) ListIndexes(ctx context.Context, collectionID int64) ([]*indexpb.IndexInfo, error)
ListIndexes provides a mock function with given fields: ctx, collectionID
type MockBroker_DescribeCollection_Call ¶
MockBroker_DescribeCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeCollection'
func (*MockBroker_DescribeCollection_Call) Return ¶
func (_c *MockBroker_DescribeCollection_Call) Return(_a0 *milvuspb.DescribeCollectionResponse, _a1 error) *MockBroker_DescribeCollection_Call
func (*MockBroker_DescribeCollection_Call) Run ¶
func (_c *MockBroker_DescribeCollection_Call) Run(run func(ctx context.Context, collectionID int64)) *MockBroker_DescribeCollection_Call
func (*MockBroker_DescribeCollection_Call) RunAndReturn ¶
func (_c *MockBroker_DescribeCollection_Call) RunAndReturn(run func(context.Context, int64) (*milvuspb.DescribeCollectionResponse, error)) *MockBroker_DescribeCollection_Call
type MockBroker_DescribeDatabase_Call ¶
MockBroker_DescribeDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeDatabase'
func (*MockBroker_DescribeDatabase_Call) Return ¶
func (_c *MockBroker_DescribeDatabase_Call) Return(_a0 *rootcoordpb.DescribeDatabaseResponse, _a1 error) *MockBroker_DescribeDatabase_Call
func (*MockBroker_DescribeDatabase_Call) Run ¶
func (_c *MockBroker_DescribeDatabase_Call) Run(run func(ctx context.Context, dbName string)) *MockBroker_DescribeDatabase_Call
func (*MockBroker_DescribeDatabase_Call) RunAndReturn ¶
func (_c *MockBroker_DescribeDatabase_Call) RunAndReturn(run func(context.Context, string) (*rootcoordpb.DescribeDatabaseResponse, error)) *MockBroker_DescribeDatabase_Call
type MockBroker_Expecter ¶
type MockBroker_Expecter struct {
// contains filtered or unexported fields
}
func (*MockBroker_Expecter) DescribeCollection ¶
func (_e *MockBroker_Expecter) DescribeCollection(ctx interface{}, collectionID interface{}) *MockBroker_DescribeCollection_Call
DescribeCollection is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
func (*MockBroker_Expecter) DescribeDatabase ¶
func (_e *MockBroker_Expecter) DescribeDatabase(ctx interface{}, dbName interface{}) *MockBroker_DescribeDatabase_Call
DescribeDatabase is a helper method to define mock.On call
- ctx context.Context
- dbName string
func (*MockBroker_Expecter) GetCollectionLoadInfo ¶
func (_e *MockBroker_Expecter) GetCollectionLoadInfo(ctx interface{}, collectionID interface{}) *MockBroker_GetCollectionLoadInfo_Call
GetCollectionLoadInfo is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
func (*MockBroker_Expecter) GetIndexInfo ¶
func (_e *MockBroker_Expecter) GetIndexInfo(ctx interface{}, collectionID interface{}, segmentIDs ...interface{}) *MockBroker_GetIndexInfo_Call
GetIndexInfo is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- segmentIDs ...int64
func (*MockBroker_Expecter) GetPartitions ¶
func (_e *MockBroker_Expecter) GetPartitions(ctx interface{}, collectionID interface{}) *MockBroker_GetPartitions_Call
GetPartitions is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
func (*MockBroker_Expecter) GetRecoveryInfo ¶
func (_e *MockBroker_Expecter) GetRecoveryInfo(ctx interface{}, collectionID interface{}, partitionID interface{}) *MockBroker_GetRecoveryInfo_Call
GetRecoveryInfo is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- partitionID int64
func (*MockBroker_Expecter) GetRecoveryInfoV2 ¶
func (_e *MockBroker_Expecter) GetRecoveryInfoV2(ctx interface{}, collectionID interface{}, partitionIDs ...interface{}) *MockBroker_GetRecoveryInfoV2_Call
GetRecoveryInfoV2 is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- partitionIDs ...int64
func (*MockBroker_Expecter) GetSegmentInfo ¶
func (_e *MockBroker_Expecter) GetSegmentInfo(ctx interface{}, segmentID ...interface{}) *MockBroker_GetSegmentInfo_Call
GetSegmentInfo is a helper method to define mock.On call
- ctx context.Context
- segmentID ...int64
func (*MockBroker_Expecter) ListIndexes ¶
func (_e *MockBroker_Expecter) ListIndexes(ctx interface{}, collectionID interface{}) *MockBroker_ListIndexes_Call
ListIndexes is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
type MockBroker_GetCollectionLoadInfo_Call ¶
MockBroker_GetCollectionLoadInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionLoadInfo'
func (*MockBroker_GetCollectionLoadInfo_Call) Return ¶
func (_c *MockBroker_GetCollectionLoadInfo_Call) Return(_a0 []string, _a1 int64, _a2 error) *MockBroker_GetCollectionLoadInfo_Call
func (*MockBroker_GetCollectionLoadInfo_Call) Run ¶
func (_c *MockBroker_GetCollectionLoadInfo_Call) Run(run func(ctx context.Context, collectionID int64)) *MockBroker_GetCollectionLoadInfo_Call
func (*MockBroker_GetCollectionLoadInfo_Call) RunAndReturn ¶
func (_c *MockBroker_GetCollectionLoadInfo_Call) RunAndReturn(run func(context.Context, int64) ([]string, int64, error)) *MockBroker_GetCollectionLoadInfo_Call
type MockBroker_GetIndexInfo_Call ¶
MockBroker_GetIndexInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIndexInfo'
func (*MockBroker_GetIndexInfo_Call) Return ¶
func (_c *MockBroker_GetIndexInfo_Call) Return(_a0 map[int64][]*querypb.FieldIndexInfo, _a1 error) *MockBroker_GetIndexInfo_Call
func (*MockBroker_GetIndexInfo_Call) Run ¶
func (_c *MockBroker_GetIndexInfo_Call) Run(run func(ctx context.Context, collectionID int64, segmentIDs ...int64)) *MockBroker_GetIndexInfo_Call
func (*MockBroker_GetIndexInfo_Call) RunAndReturn ¶
func (_c *MockBroker_GetIndexInfo_Call) RunAndReturn(run func(context.Context, int64, ...int64) (map[int64][]*querypb.FieldIndexInfo, error)) *MockBroker_GetIndexInfo_Call
type MockBroker_GetPartitions_Call ¶
MockBroker_GetPartitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPartitions'
func (*MockBroker_GetPartitions_Call) Return ¶
func (_c *MockBroker_GetPartitions_Call) Return(_a0 []int64, _a1 error) *MockBroker_GetPartitions_Call
func (*MockBroker_GetPartitions_Call) Run ¶
func (_c *MockBroker_GetPartitions_Call) Run(run func(ctx context.Context, collectionID int64)) *MockBroker_GetPartitions_Call
func (*MockBroker_GetPartitions_Call) RunAndReturn ¶
func (_c *MockBroker_GetPartitions_Call) RunAndReturn(run func(context.Context, int64) ([]int64, error)) *MockBroker_GetPartitions_Call
type MockBroker_GetRecoveryInfoV2_Call ¶
MockBroker_GetRecoveryInfoV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecoveryInfoV2'
func (*MockBroker_GetRecoveryInfoV2_Call) Return ¶
func (_c *MockBroker_GetRecoveryInfoV2_Call) Return(_a0 []*datapb.VchannelInfo, _a1 []*datapb.SegmentInfo, _a2 error) *MockBroker_GetRecoveryInfoV2_Call
func (*MockBroker_GetRecoveryInfoV2_Call) Run ¶
func (_c *MockBroker_GetRecoveryInfoV2_Call) Run(run func(ctx context.Context, collectionID int64, partitionIDs ...int64)) *MockBroker_GetRecoveryInfoV2_Call
func (*MockBroker_GetRecoveryInfoV2_Call) RunAndReturn ¶
func (_c *MockBroker_GetRecoveryInfoV2_Call) RunAndReturn(run func(context.Context, int64, ...int64) ([]*datapb.VchannelInfo, []*datapb.SegmentInfo, error)) *MockBroker_GetRecoveryInfoV2_Call
type MockBroker_GetRecoveryInfo_Call ¶
MockBroker_GetRecoveryInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecoveryInfo'
func (*MockBroker_GetRecoveryInfo_Call) Return ¶
func (_c *MockBroker_GetRecoveryInfo_Call) Return(_a0 []*datapb.VchannelInfo, _a1 []*datapb.SegmentBinlogs, _a2 error) *MockBroker_GetRecoveryInfo_Call
func (*MockBroker_GetRecoveryInfo_Call) Run ¶
func (_c *MockBroker_GetRecoveryInfo_Call) Run(run func(ctx context.Context, collectionID int64, partitionID int64)) *MockBroker_GetRecoveryInfo_Call
func (*MockBroker_GetRecoveryInfo_Call) RunAndReturn ¶
func (_c *MockBroker_GetRecoveryInfo_Call) RunAndReturn(run func(context.Context, int64, int64) ([]*datapb.VchannelInfo, []*datapb.SegmentBinlogs, error)) *MockBroker_GetRecoveryInfo_Call
type MockBroker_GetSegmentInfo_Call ¶
MockBroker_GetSegmentInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSegmentInfo'
func (*MockBroker_GetSegmentInfo_Call) Return ¶
func (_c *MockBroker_GetSegmentInfo_Call) Return(_a0 []*datapb.SegmentInfo, _a1 error) *MockBroker_GetSegmentInfo_Call
func (*MockBroker_GetSegmentInfo_Call) Run ¶
func (_c *MockBroker_GetSegmentInfo_Call) Run(run func(ctx context.Context, segmentID ...int64)) *MockBroker_GetSegmentInfo_Call
func (*MockBroker_GetSegmentInfo_Call) RunAndReturn ¶
func (_c *MockBroker_GetSegmentInfo_Call) RunAndReturn(run func(context.Context, ...int64) ([]*datapb.SegmentInfo, error)) *MockBroker_GetSegmentInfo_Call
type MockBroker_ListIndexes_Call ¶
MockBroker_ListIndexes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListIndexes'
func (*MockBroker_ListIndexes_Call) Return ¶
func (_c *MockBroker_ListIndexes_Call) Return(_a0 []*indexpb.IndexInfo, _a1 error) *MockBroker_ListIndexes_Call
func (*MockBroker_ListIndexes_Call) Run ¶
func (_c *MockBroker_ListIndexes_Call) Run(run func(ctx context.Context, collectionID int64)) *MockBroker_ListIndexes_Call
func (*MockBroker_ListIndexes_Call) RunAndReturn ¶
func (_c *MockBroker_ListIndexes_Call) RunAndReturn(run func(context.Context, int64) ([]*indexpb.IndexInfo, error)) *MockBroker_ListIndexes_Call
type MockTargetManager ¶
MockTargetManager is an autogenerated mock type for the TargetManagerInterface type
func NewMockTargetManager ¶
func NewMockTargetManager(t interface { mock.TestingT Cleanup(func()) }) *MockTargetManager
NewMockTargetManager creates a new instance of MockTargetManager. 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 (*MockTargetManager) CanSegmentBeMoved ¶
func (_m *MockTargetManager) CanSegmentBeMoved(ctx context.Context, collectionID int64, segmentID int64) bool
CanSegmentBeMoved provides a mock function with given fields: ctx, collectionID, segmentID
func (*MockTargetManager) EXPECT ¶
func (_m *MockTargetManager) EXPECT() *MockTargetManager_Expecter
func (*MockTargetManager) GetCollectionTargetVersion ¶
func (_m *MockTargetManager) GetCollectionTargetVersion(ctx context.Context, collectionID int64, scope int32) int64
GetCollectionTargetVersion provides a mock function with given fields: ctx, collectionID, scope
func (*MockTargetManager) GetDmChannel ¶
func (_m *MockTargetManager) GetDmChannel(ctx context.Context, collectionID int64, channel string, scope int32) *DmChannel
GetDmChannel provides a mock function with given fields: ctx, collectionID, channel, scope
func (*MockTargetManager) GetDmChannelsByCollection ¶
func (_m *MockTargetManager) GetDmChannelsByCollection(ctx context.Context, collectionID int64, scope int32) map[string]*DmChannel
GetDmChannelsByCollection provides a mock function with given fields: ctx, collectionID, scope
func (*MockTargetManager) GetDroppedSegmentsByChannel ¶
func (_m *MockTargetManager) GetDroppedSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope int32) []int64
GetDroppedSegmentsByChannel provides a mock function with given fields: ctx, collectionID, channelName, scope
func (*MockTargetManager) GetGrowingSegmentsByChannel ¶
func (_m *MockTargetManager) GetGrowingSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope int32) typeutil.Set[int64]
GetGrowingSegmentsByChannel provides a mock function with given fields: ctx, collectionID, channelName, scope
func (*MockTargetManager) GetGrowingSegmentsByCollection ¶
func (_m *MockTargetManager) GetGrowingSegmentsByCollection(ctx context.Context, collectionID int64, scope int32) typeutil.Set[int64]
GetGrowingSegmentsByCollection provides a mock function with given fields: ctx, collectionID, scope
func (*MockTargetManager) GetSealedSegment ¶
func (_m *MockTargetManager) GetSealedSegment(ctx context.Context, collectionID int64, id int64, scope int32) *datapb.SegmentInfo
GetSealedSegment provides a mock function with given fields: ctx, collectionID, id, scope
func (*MockTargetManager) GetSealedSegmentsByChannel ¶
func (_m *MockTargetManager) GetSealedSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope int32) map[int64]*datapb.SegmentInfo
GetSealedSegmentsByChannel provides a mock function with given fields: ctx, collectionID, channelName, scope
func (*MockTargetManager) GetSealedSegmentsByCollection ¶
func (_m *MockTargetManager) GetSealedSegmentsByCollection(ctx context.Context, collectionID int64, scope int32) map[int64]*datapb.SegmentInfo
GetSealedSegmentsByCollection provides a mock function with given fields: ctx, collectionID, scope
func (*MockTargetManager) GetSealedSegmentsByPartition ¶
func (_m *MockTargetManager) GetSealedSegmentsByPartition(ctx context.Context, collectionID int64, partitionID int64, scope int32) map[int64]*datapb.SegmentInfo
GetSealedSegmentsByPartition provides a mock function with given fields: ctx, collectionID, partitionID, scope
func (*MockTargetManager) GetTargetJSON ¶
func (_m *MockTargetManager) GetTargetJSON(ctx context.Context, scope int32) string
GetTargetJSON provides a mock function with given fields: ctx, scope
func (*MockTargetManager) IsCurrentTargetExist ¶
func (_m *MockTargetManager) IsCurrentTargetExist(ctx context.Context, collectionID int64, partitionID int64) bool
IsCurrentTargetExist provides a mock function with given fields: ctx, collectionID, partitionID
func (*MockTargetManager) IsNextTargetExist ¶
func (_m *MockTargetManager) IsNextTargetExist(ctx context.Context, collectionID int64) bool
IsNextTargetExist provides a mock function with given fields: ctx, collectionID
func (*MockTargetManager) Recover ¶
func (_m *MockTargetManager) Recover(ctx context.Context, catalog metastore.QueryCoordCatalog) error
Recover provides a mock function with given fields: ctx, catalog
func (*MockTargetManager) RemoveCollection ¶
func (_m *MockTargetManager) RemoveCollection(ctx context.Context, collectionID int64)
RemoveCollection provides a mock function with given fields: ctx, collectionID
func (*MockTargetManager) RemovePartition ¶
func (_m *MockTargetManager) RemovePartition(ctx context.Context, collectionID int64, partitionIDs ...int64)
RemovePartition provides a mock function with given fields: ctx, collectionID, partitionIDs
func (*MockTargetManager) SaveCurrentTarget ¶
func (_m *MockTargetManager) SaveCurrentTarget(ctx context.Context, catalog metastore.QueryCoordCatalog)
SaveCurrentTarget provides a mock function with given fields: ctx, catalog
func (*MockTargetManager) UpdateCollectionCurrentTarget ¶
func (_m *MockTargetManager) UpdateCollectionCurrentTarget(ctx context.Context, collectionID int64) bool
UpdateCollectionCurrentTarget provides a mock function with given fields: ctx, collectionID
func (*MockTargetManager) UpdateCollectionNextTarget ¶
func (_m *MockTargetManager) UpdateCollectionNextTarget(ctx context.Context, collectionID int64) error
UpdateCollectionNextTarget provides a mock function with given fields: ctx, collectionID
type MockTargetManager_CanSegmentBeMoved_Call ¶
MockTargetManager_CanSegmentBeMoved_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CanSegmentBeMoved'
func (*MockTargetManager_CanSegmentBeMoved_Call) Return ¶
func (_c *MockTargetManager_CanSegmentBeMoved_Call) Return(_a0 bool) *MockTargetManager_CanSegmentBeMoved_Call
func (*MockTargetManager_CanSegmentBeMoved_Call) Run ¶
func (_c *MockTargetManager_CanSegmentBeMoved_Call) Run(run func(ctx context.Context, collectionID int64, segmentID int64)) *MockTargetManager_CanSegmentBeMoved_Call
func (*MockTargetManager_CanSegmentBeMoved_Call) RunAndReturn ¶
func (_c *MockTargetManager_CanSegmentBeMoved_Call) RunAndReturn(run func(context.Context, int64, int64) bool) *MockTargetManager_CanSegmentBeMoved_Call
type MockTargetManager_Expecter ¶
type MockTargetManager_Expecter struct {
// contains filtered or unexported fields
}
func (*MockTargetManager_Expecter) CanSegmentBeMoved ¶
func (_e *MockTargetManager_Expecter) CanSegmentBeMoved(ctx interface{}, collectionID interface{}, segmentID interface{}) *MockTargetManager_CanSegmentBeMoved_Call
CanSegmentBeMoved is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- segmentID int64
func (*MockTargetManager_Expecter) GetCollectionTargetVersion ¶
func (_e *MockTargetManager_Expecter) GetCollectionTargetVersion(ctx interface{}, collectionID interface{}, scope interface{}) *MockTargetManager_GetCollectionTargetVersion_Call
GetCollectionTargetVersion is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- scope int32
func (*MockTargetManager_Expecter) GetDmChannel ¶
func (_e *MockTargetManager_Expecter) GetDmChannel(ctx interface{}, collectionID interface{}, channel interface{}, scope interface{}) *MockTargetManager_GetDmChannel_Call
GetDmChannel is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- channel string
- scope int32
func (*MockTargetManager_Expecter) GetDmChannelsByCollection ¶
func (_e *MockTargetManager_Expecter) GetDmChannelsByCollection(ctx interface{}, collectionID interface{}, scope interface{}) *MockTargetManager_GetDmChannelsByCollection_Call
GetDmChannelsByCollection is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- scope int32
func (*MockTargetManager_Expecter) GetDroppedSegmentsByChannel ¶
func (_e *MockTargetManager_Expecter) GetDroppedSegmentsByChannel(ctx interface{}, collectionID interface{}, channelName interface{}, scope interface{}) *MockTargetManager_GetDroppedSegmentsByChannel_Call
GetDroppedSegmentsByChannel is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- channelName string
- scope int32
func (*MockTargetManager_Expecter) GetGrowingSegmentsByChannel ¶
func (_e *MockTargetManager_Expecter) GetGrowingSegmentsByChannel(ctx interface{}, collectionID interface{}, channelName interface{}, scope interface{}) *MockTargetManager_GetGrowingSegmentsByChannel_Call
GetGrowingSegmentsByChannel is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- channelName string
- scope int32
func (*MockTargetManager_Expecter) GetGrowingSegmentsByCollection ¶
func (_e *MockTargetManager_Expecter) GetGrowingSegmentsByCollection(ctx interface{}, collectionID interface{}, scope interface{}) *MockTargetManager_GetGrowingSegmentsByCollection_Call
GetGrowingSegmentsByCollection is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- scope int32
func (*MockTargetManager_Expecter) GetSealedSegment ¶
func (_e *MockTargetManager_Expecter) GetSealedSegment(ctx interface{}, collectionID interface{}, id interface{}, scope interface{}) *MockTargetManager_GetSealedSegment_Call
GetSealedSegment is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- id int64
- scope int32
func (*MockTargetManager_Expecter) GetSealedSegmentsByChannel ¶
func (_e *MockTargetManager_Expecter) GetSealedSegmentsByChannel(ctx interface{}, collectionID interface{}, channelName interface{}, scope interface{}) *MockTargetManager_GetSealedSegmentsByChannel_Call
GetSealedSegmentsByChannel is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- channelName string
- scope int32
func (*MockTargetManager_Expecter) GetSealedSegmentsByCollection ¶
func (_e *MockTargetManager_Expecter) GetSealedSegmentsByCollection(ctx interface{}, collectionID interface{}, scope interface{}) *MockTargetManager_GetSealedSegmentsByCollection_Call
GetSealedSegmentsByCollection is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- scope int32
func (*MockTargetManager_Expecter) GetSealedSegmentsByPartition ¶
func (_e *MockTargetManager_Expecter) GetSealedSegmentsByPartition(ctx interface{}, collectionID interface{}, partitionID interface{}, scope interface{}) *MockTargetManager_GetSealedSegmentsByPartition_Call
GetSealedSegmentsByPartition is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- partitionID int64
- scope int32
func (*MockTargetManager_Expecter) GetTargetJSON ¶
func (_e *MockTargetManager_Expecter) GetTargetJSON(ctx interface{}, scope interface{}) *MockTargetManager_GetTargetJSON_Call
GetTargetJSON is a helper method to define mock.On call
- ctx context.Context
- scope int32
func (*MockTargetManager_Expecter) IsCurrentTargetExist ¶
func (_e *MockTargetManager_Expecter) IsCurrentTargetExist(ctx interface{}, collectionID interface{}, partitionID interface{}) *MockTargetManager_IsCurrentTargetExist_Call
IsCurrentTargetExist is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- partitionID int64
func (*MockTargetManager_Expecter) IsNextTargetExist ¶
func (_e *MockTargetManager_Expecter) IsNextTargetExist(ctx interface{}, collectionID interface{}) *MockTargetManager_IsNextTargetExist_Call
IsNextTargetExist is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
func (*MockTargetManager_Expecter) Recover ¶
func (_e *MockTargetManager_Expecter) Recover(ctx interface{}, catalog interface{}) *MockTargetManager_Recover_Call
Recover is a helper method to define mock.On call
- ctx context.Context
- catalog metastore.QueryCoordCatalog
func (*MockTargetManager_Expecter) RemoveCollection ¶
func (_e *MockTargetManager_Expecter) RemoveCollection(ctx interface{}, collectionID interface{}) *MockTargetManager_RemoveCollection_Call
RemoveCollection is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
func (*MockTargetManager_Expecter) RemovePartition ¶
func (_e *MockTargetManager_Expecter) RemovePartition(ctx interface{}, collectionID interface{}, partitionIDs ...interface{}) *MockTargetManager_RemovePartition_Call
RemovePartition is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
- partitionIDs ...int64
func (*MockTargetManager_Expecter) SaveCurrentTarget ¶
func (_e *MockTargetManager_Expecter) SaveCurrentTarget(ctx interface{}, catalog interface{}) *MockTargetManager_SaveCurrentTarget_Call
SaveCurrentTarget is a helper method to define mock.On call
- ctx context.Context
- catalog metastore.QueryCoordCatalog
func (*MockTargetManager_Expecter) UpdateCollectionCurrentTarget ¶
func (_e *MockTargetManager_Expecter) UpdateCollectionCurrentTarget(ctx interface{}, collectionID interface{}) *MockTargetManager_UpdateCollectionCurrentTarget_Call
UpdateCollectionCurrentTarget is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
func (*MockTargetManager_Expecter) UpdateCollectionNextTarget ¶
func (_e *MockTargetManager_Expecter) UpdateCollectionNextTarget(ctx interface{}, collectionID interface{}) *MockTargetManager_UpdateCollectionNextTarget_Call
UpdateCollectionNextTarget is a helper method to define mock.On call
- ctx context.Context
- collectionID int64
type MockTargetManager_GetCollectionTargetVersion_Call ¶
MockTargetManager_GetCollectionTargetVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionTargetVersion'
func (*MockTargetManager_GetCollectionTargetVersion_Call) Return ¶
func (_c *MockTargetManager_GetCollectionTargetVersion_Call) Return(_a0 int64) *MockTargetManager_GetCollectionTargetVersion_Call
func (*MockTargetManager_GetCollectionTargetVersion_Call) Run ¶
func (_c *MockTargetManager_GetCollectionTargetVersion_Call) Run(run func(ctx context.Context, collectionID int64, scope int32)) *MockTargetManager_GetCollectionTargetVersion_Call
func (*MockTargetManager_GetCollectionTargetVersion_Call) RunAndReturn ¶
func (_c *MockTargetManager_GetCollectionTargetVersion_Call) RunAndReturn(run func(context.Context, int64, int32) int64) *MockTargetManager_GetCollectionTargetVersion_Call
type MockTargetManager_GetDmChannel_Call ¶
MockTargetManager_GetDmChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDmChannel'
func (*MockTargetManager_GetDmChannel_Call) Return ¶
func (_c *MockTargetManager_GetDmChannel_Call) Return(_a0 *DmChannel) *MockTargetManager_GetDmChannel_Call
func (*MockTargetManager_GetDmChannel_Call) Run ¶
func (_c *MockTargetManager_GetDmChannel_Call) Run(run func(ctx context.Context, collectionID int64, channel string, scope int32)) *MockTargetManager_GetDmChannel_Call
func (*MockTargetManager_GetDmChannel_Call) RunAndReturn ¶
func (_c *MockTargetManager_GetDmChannel_Call) RunAndReturn(run func(context.Context, int64, string, int32) *DmChannel) *MockTargetManager_GetDmChannel_Call
type MockTargetManager_GetDmChannelsByCollection_Call ¶
MockTargetManager_GetDmChannelsByCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDmChannelsByCollection'
func (*MockTargetManager_GetDmChannelsByCollection_Call) Return ¶
func (_c *MockTargetManager_GetDmChannelsByCollection_Call) Return(_a0 map[string]*DmChannel) *MockTargetManager_GetDmChannelsByCollection_Call
func (*MockTargetManager_GetDmChannelsByCollection_Call) Run ¶
func (_c *MockTargetManager_GetDmChannelsByCollection_Call) Run(run func(ctx context.Context, collectionID int64, scope int32)) *MockTargetManager_GetDmChannelsByCollection_Call
func (*MockTargetManager_GetDmChannelsByCollection_Call) RunAndReturn ¶
func (_c *MockTargetManager_GetDmChannelsByCollection_Call) RunAndReturn(run func(context.Context, int64, int32) map[string]*DmChannel) *MockTargetManager_GetDmChannelsByCollection_Call
type MockTargetManager_GetDroppedSegmentsByChannel_Call ¶
MockTargetManager_GetDroppedSegmentsByChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDroppedSegmentsByChannel'
func (*MockTargetManager_GetDroppedSegmentsByChannel_Call) Return ¶
func (_c *MockTargetManager_GetDroppedSegmentsByChannel_Call) Return(_a0 []int64) *MockTargetManager_GetDroppedSegmentsByChannel_Call
func (*MockTargetManager_GetDroppedSegmentsByChannel_Call) Run ¶
func (_c *MockTargetManager_GetDroppedSegmentsByChannel_Call) Run(run func(ctx context.Context, collectionID int64, channelName string, scope int32)) *MockTargetManager_GetDroppedSegmentsByChannel_Call
func (*MockTargetManager_GetDroppedSegmentsByChannel_Call) RunAndReturn ¶
func (_c *MockTargetManager_GetDroppedSegmentsByChannel_Call) RunAndReturn(run func(context.Context, int64, string, int32) []int64) *MockTargetManager_GetDroppedSegmentsByChannel_Call
type MockTargetManager_GetGrowingSegmentsByChannel_Call ¶
MockTargetManager_GetGrowingSegmentsByChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGrowingSegmentsByChannel'
func (*MockTargetManager_GetGrowingSegmentsByChannel_Call) Return ¶
func (_c *MockTargetManager_GetGrowingSegmentsByChannel_Call) Return(_a0 typeutil.Set[int64]) *MockTargetManager_GetGrowingSegmentsByChannel_Call
func (*MockTargetManager_GetGrowingSegmentsByChannel_Call) Run ¶
func (_c *MockTargetManager_GetGrowingSegmentsByChannel_Call) Run(run func(ctx context.Context, collectionID int64, channelName string, scope int32)) *MockTargetManager_GetGrowingSegmentsByChannel_Call
func (*MockTargetManager_GetGrowingSegmentsByChannel_Call) RunAndReturn ¶
func (_c *MockTargetManager_GetGrowingSegmentsByChannel_Call) RunAndReturn(run func(context.Context, int64, string, int32) typeutil.Set[int64]) *MockTargetManager_GetGrowingSegmentsByChannel_Call
type MockTargetManager_GetGrowingSegmentsByCollection_Call ¶
MockTargetManager_GetGrowingSegmentsByCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGrowingSegmentsByCollection'
func (*MockTargetManager_GetGrowingSegmentsByCollection_Call) Run ¶
func (_c *MockTargetManager_GetGrowingSegmentsByCollection_Call) Run(run func(ctx context.Context, collectionID int64, scope int32)) *MockTargetManager_GetGrowingSegmentsByCollection_Call
func (*MockTargetManager_GetGrowingSegmentsByCollection_Call) RunAndReturn ¶
func (_c *MockTargetManager_GetGrowingSegmentsByCollection_Call) RunAndReturn(run func(context.Context, int64, int32) typeutil.Set[int64]) *MockTargetManager_GetGrowingSegmentsByCollection_Call
type MockTargetManager_GetSealedSegment_Call ¶
MockTargetManager_GetSealedSegment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSealedSegment'
func (*MockTargetManager_GetSealedSegment_Call) Return ¶
func (_c *MockTargetManager_GetSealedSegment_Call) Return(_a0 *datapb.SegmentInfo) *MockTargetManager_GetSealedSegment_Call
func (*MockTargetManager_GetSealedSegment_Call) Run ¶
func (_c *MockTargetManager_GetSealedSegment_Call) Run(run func(ctx context.Context, collectionID int64, id int64, scope int32)) *MockTargetManager_GetSealedSegment_Call
func (*MockTargetManager_GetSealedSegment_Call) RunAndReturn ¶
func (_c *MockTargetManager_GetSealedSegment_Call) RunAndReturn(run func(context.Context, int64, int64, int32) *datapb.SegmentInfo) *MockTargetManager_GetSealedSegment_Call
type MockTargetManager_GetSealedSegmentsByChannel_Call ¶
MockTargetManager_GetSealedSegmentsByChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSealedSegmentsByChannel'
func (*MockTargetManager_GetSealedSegmentsByChannel_Call) Return ¶
func (_c *MockTargetManager_GetSealedSegmentsByChannel_Call) Return(_a0 map[int64]*datapb.SegmentInfo) *MockTargetManager_GetSealedSegmentsByChannel_Call
func (*MockTargetManager_GetSealedSegmentsByChannel_Call) Run ¶
func (_c *MockTargetManager_GetSealedSegmentsByChannel_Call) Run(run func(ctx context.Context, collectionID int64, channelName string, scope int32)) *MockTargetManager_GetSealedSegmentsByChannel_Call
func (*MockTargetManager_GetSealedSegmentsByChannel_Call) RunAndReturn ¶
func (_c *MockTargetManager_GetSealedSegmentsByChannel_Call) RunAndReturn(run func(context.Context, int64, string, int32) map[int64]*datapb.SegmentInfo) *MockTargetManager_GetSealedSegmentsByChannel_Call
type MockTargetManager_GetSealedSegmentsByCollection_Call ¶
MockTargetManager_GetSealedSegmentsByCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSealedSegmentsByCollection'
func (*MockTargetManager_GetSealedSegmentsByCollection_Call) Return ¶
func (_c *MockTargetManager_GetSealedSegmentsByCollection_Call) Return(_a0 map[int64]*datapb.SegmentInfo) *MockTargetManager_GetSealedSegmentsByCollection_Call
func (*MockTargetManager_GetSealedSegmentsByCollection_Call) Run ¶
func (_c *MockTargetManager_GetSealedSegmentsByCollection_Call) Run(run func(ctx context.Context, collectionID int64, scope int32)) *MockTargetManager_GetSealedSegmentsByCollection_Call
func (*MockTargetManager_GetSealedSegmentsByCollection_Call) RunAndReturn ¶
func (_c *MockTargetManager_GetSealedSegmentsByCollection_Call) RunAndReturn(run func(context.Context, int64, int32) map[int64]*datapb.SegmentInfo) *MockTargetManager_GetSealedSegmentsByCollection_Call
type MockTargetManager_GetSealedSegmentsByPartition_Call ¶
MockTargetManager_GetSealedSegmentsByPartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSealedSegmentsByPartition'
func (*MockTargetManager_GetSealedSegmentsByPartition_Call) Return ¶
func (_c *MockTargetManager_GetSealedSegmentsByPartition_Call) Return(_a0 map[int64]*datapb.SegmentInfo) *MockTargetManager_GetSealedSegmentsByPartition_Call
func (*MockTargetManager_GetSealedSegmentsByPartition_Call) Run ¶
func (_c *MockTargetManager_GetSealedSegmentsByPartition_Call) Run(run func(ctx context.Context, collectionID int64, partitionID int64, scope int32)) *MockTargetManager_GetSealedSegmentsByPartition_Call
func (*MockTargetManager_GetSealedSegmentsByPartition_Call) RunAndReturn ¶
func (_c *MockTargetManager_GetSealedSegmentsByPartition_Call) RunAndReturn(run func(context.Context, int64, int64, int32) map[int64]*datapb.SegmentInfo) *MockTargetManager_GetSealedSegmentsByPartition_Call
type MockTargetManager_GetTargetJSON_Call ¶
MockTargetManager_GetTargetJSON_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTargetJSON'
func (*MockTargetManager_GetTargetJSON_Call) Return ¶
func (_c *MockTargetManager_GetTargetJSON_Call) Return(_a0 string) *MockTargetManager_GetTargetJSON_Call
func (*MockTargetManager_GetTargetJSON_Call) Run ¶
func (_c *MockTargetManager_GetTargetJSON_Call) Run(run func(ctx context.Context, scope int32)) *MockTargetManager_GetTargetJSON_Call
func (*MockTargetManager_GetTargetJSON_Call) RunAndReturn ¶
func (_c *MockTargetManager_GetTargetJSON_Call) RunAndReturn(run func(context.Context, int32) string) *MockTargetManager_GetTargetJSON_Call
type MockTargetManager_IsCurrentTargetExist_Call ¶
MockTargetManager_IsCurrentTargetExist_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsCurrentTargetExist'
func (*MockTargetManager_IsCurrentTargetExist_Call) Return ¶
func (_c *MockTargetManager_IsCurrentTargetExist_Call) Return(_a0 bool) *MockTargetManager_IsCurrentTargetExist_Call
func (*MockTargetManager_IsCurrentTargetExist_Call) Run ¶
func (_c *MockTargetManager_IsCurrentTargetExist_Call) Run(run func(ctx context.Context, collectionID int64, partitionID int64)) *MockTargetManager_IsCurrentTargetExist_Call
func (*MockTargetManager_IsCurrentTargetExist_Call) RunAndReturn ¶
func (_c *MockTargetManager_IsCurrentTargetExist_Call) RunAndReturn(run func(context.Context, int64, int64) bool) *MockTargetManager_IsCurrentTargetExist_Call
type MockTargetManager_IsNextTargetExist_Call ¶
MockTargetManager_IsNextTargetExist_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsNextTargetExist'
func (*MockTargetManager_IsNextTargetExist_Call) Return ¶
func (_c *MockTargetManager_IsNextTargetExist_Call) Return(_a0 bool) *MockTargetManager_IsNextTargetExist_Call
func (*MockTargetManager_IsNextTargetExist_Call) Run ¶
func (_c *MockTargetManager_IsNextTargetExist_Call) Run(run func(ctx context.Context, collectionID int64)) *MockTargetManager_IsNextTargetExist_Call
func (*MockTargetManager_IsNextTargetExist_Call) RunAndReturn ¶
func (_c *MockTargetManager_IsNextTargetExist_Call) RunAndReturn(run func(context.Context, int64) bool) *MockTargetManager_IsNextTargetExist_Call
type MockTargetManager_Recover_Call ¶
MockTargetManager_Recover_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Recover'
func (*MockTargetManager_Recover_Call) Return ¶
func (_c *MockTargetManager_Recover_Call) Return(_a0 error) *MockTargetManager_Recover_Call
func (*MockTargetManager_Recover_Call) Run ¶
func (_c *MockTargetManager_Recover_Call) Run(run func(ctx context.Context, catalog metastore.QueryCoordCatalog)) *MockTargetManager_Recover_Call
func (*MockTargetManager_Recover_Call) RunAndReturn ¶
func (_c *MockTargetManager_Recover_Call) RunAndReturn(run func(context.Context, metastore.QueryCoordCatalog) error) *MockTargetManager_Recover_Call
type MockTargetManager_RemoveCollection_Call ¶
MockTargetManager_RemoveCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCollection'
func (*MockTargetManager_RemoveCollection_Call) Return ¶
func (_c *MockTargetManager_RemoveCollection_Call) Return() *MockTargetManager_RemoveCollection_Call
func (*MockTargetManager_RemoveCollection_Call) Run ¶
func (_c *MockTargetManager_RemoveCollection_Call) Run(run func(ctx context.Context, collectionID int64)) *MockTargetManager_RemoveCollection_Call
func (*MockTargetManager_RemoveCollection_Call) RunAndReturn ¶
func (_c *MockTargetManager_RemoveCollection_Call) RunAndReturn(run func(context.Context, int64)) *MockTargetManager_RemoveCollection_Call
type MockTargetManager_RemovePartition_Call ¶
MockTargetManager_RemovePartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemovePartition'
func (*MockTargetManager_RemovePartition_Call) Return ¶
func (_c *MockTargetManager_RemovePartition_Call) Return() *MockTargetManager_RemovePartition_Call
func (*MockTargetManager_RemovePartition_Call) Run ¶
func (_c *MockTargetManager_RemovePartition_Call) Run(run func(ctx context.Context, collectionID int64, partitionIDs ...int64)) *MockTargetManager_RemovePartition_Call
func (*MockTargetManager_RemovePartition_Call) RunAndReturn ¶
func (_c *MockTargetManager_RemovePartition_Call) RunAndReturn(run func(context.Context, int64, ...int64)) *MockTargetManager_RemovePartition_Call
type MockTargetManager_SaveCurrentTarget_Call ¶
MockTargetManager_SaveCurrentTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveCurrentTarget'
func (*MockTargetManager_SaveCurrentTarget_Call) Return ¶
func (_c *MockTargetManager_SaveCurrentTarget_Call) Return() *MockTargetManager_SaveCurrentTarget_Call
func (*MockTargetManager_SaveCurrentTarget_Call) Run ¶
func (_c *MockTargetManager_SaveCurrentTarget_Call) Run(run func(ctx context.Context, catalog metastore.QueryCoordCatalog)) *MockTargetManager_SaveCurrentTarget_Call
func (*MockTargetManager_SaveCurrentTarget_Call) RunAndReturn ¶
func (_c *MockTargetManager_SaveCurrentTarget_Call) RunAndReturn(run func(context.Context, metastore.QueryCoordCatalog)) *MockTargetManager_SaveCurrentTarget_Call
type MockTargetManager_UpdateCollectionCurrentTarget_Call ¶
MockTargetManager_UpdateCollectionCurrentTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCollectionCurrentTarget'
func (*MockTargetManager_UpdateCollectionCurrentTarget_Call) Run ¶
func (_c *MockTargetManager_UpdateCollectionCurrentTarget_Call) Run(run func(ctx context.Context, collectionID int64)) *MockTargetManager_UpdateCollectionCurrentTarget_Call
func (*MockTargetManager_UpdateCollectionCurrentTarget_Call) RunAndReturn ¶
func (_c *MockTargetManager_UpdateCollectionCurrentTarget_Call) RunAndReturn(run func(context.Context, int64) bool) *MockTargetManager_UpdateCollectionCurrentTarget_Call
type MockTargetManager_UpdateCollectionNextTarget_Call ¶
MockTargetManager_UpdateCollectionNextTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCollectionNextTarget'
func (*MockTargetManager_UpdateCollectionNextTarget_Call) Return ¶
func (_c *MockTargetManager_UpdateCollectionNextTarget_Call) Return(_a0 error) *MockTargetManager_UpdateCollectionNextTarget_Call
func (*MockTargetManager_UpdateCollectionNextTarget_Call) Run ¶
func (_c *MockTargetManager_UpdateCollectionNextTarget_Call) Run(run func(ctx context.Context, collectionID int64)) *MockTargetManager_UpdateCollectionNextTarget_Call
func (*MockTargetManager_UpdateCollectionNextTarget_Call) RunAndReturn ¶
func (_c *MockTargetManager_UpdateCollectionNextTarget_Call) RunAndReturn(run func(context.Context, int64) error) *MockTargetManager_UpdateCollectionNextTarget_Call
type NodeSegDistFilter ¶
type NodeSegDistFilter int64
func (NodeSegDistFilter) AddFilter ¶
func (f NodeSegDistFilter) AddFilter(filter *segDistCriterion)
func (NodeSegDistFilter) Match ¶
func (f NodeSegDistFilter) Match(s *Segment) bool
type NotifyDelegatorChanges ¶
type NotifyDelegatorChanges = func(collectionID ...int64)
type Partition ¶
type Replica ¶
type Replica struct {
// contains filtered or unexported fields
}
Replica is a immutable type for manipulating replica meta info for replica manager. Performed a copy-on-write strategy to keep the consistency of the replica manager. So only read only operations are allowed on these type.
func (*Replica) ContainRONode ¶
ContainRONode checks if the node is in ro nodes of the replica.
func (*Replica) ContainRWNode ¶
ContainRONode checks if the node is in ro nodes of the replica.
func (*Replica) CopyForWrite ¶
func (replica *Replica) CopyForWrite() *mutableReplica
CopyForWrite returns a mutable replica for write operations.
func (*Replica) GetChannelRWNodes ¶
func (*Replica) GetCollectionID ¶
GetCollectionID returns the collection id of the replica.
func (*Replica) GetNodes ¶
GetNodes returns the rw nodes of the replica. readonly, don't modify the returned slice.
func (*Replica) GetRONodes ¶
GetRONodes returns the ro nodes of the replica. readonly, don't modify the returned slice.
func (*Replica) GetRWNodes ¶
GetRONodes returns the rw nodes of the replica. readonly, don't modify the returned slice.
func (*Replica) GetResourceGroup ¶
GetResourceGroup returns the resource group name of the replica.
func (*Replica) NodesCount ¶
NodesCount returns the count of rw nodes and ro nodes of the replica.
func (*Replica) RONodesCount ¶
RONodesCount returns the count of ro nodes of the replica.
func (*Replica) RWNodesCount ¶
RWNodesCount returns the count of rw nodes of the replica.
func (*Replica) RangeOverRONodes ¶
RangeOverRONodes iterates over the ro nodes of the replica.
func (*Replica) RangeOverRWNodes ¶
RangeOverRWNodes iterates over the read and write nodes of the replica.
type ReplicaManager ¶
type ReplicaManager struct {
// contains filtered or unexported fields
}
func NewReplicaManager ¶
func NewReplicaManager(idAllocator func() (int64, error), catalog metastore.QueryCoordCatalog) *ReplicaManager
func (*ReplicaManager) Get ¶
Get returns the replica by id. Replica should be read-only, do not modify it.
func (*ReplicaManager) GetByCollection ¶
func (*ReplicaManager) GetByCollectionAndNode ¶
func (*ReplicaManager) GetByResourceGroup ¶
func (m *ReplicaManager) GetByResourceGroup(ctx context.Context, rgName string) []*Replica
func (*ReplicaManager) GetReplicasJSON ¶
func (m *ReplicaManager) GetReplicasJSON(ctx context.Context) string
GetReplicasJSON returns a JSON representation of all replicas managed by the ReplicaManager. It locks the ReplicaManager for reading, converts the replicas to their protobuf representation, marshals them into a JSON string, and returns the result. If an error occurs during marshaling, it logs a warning and returns an empty string.
func (*ReplicaManager) GetResourceGroupByCollection ¶
func (*ReplicaManager) MoveReplica ¶
func (*ReplicaManager) Recover ¶
func (m *ReplicaManager) Recover(ctx context.Context, collections []int64) error
Recover recovers the replicas for given collections from meta store
func (*ReplicaManager) RecoverNodesInCollection ¶
func (m *ReplicaManager) RecoverNodesInCollection(ctx context.Context, collectionID typeutil.UniqueID, rgs map[string]typeutil.UniqueSet) error
RecoverNodesInCollection recovers all nodes in collection with latest resource group. Promise a node will be only assigned to one replica in same collection at same time. 1. Move the rw nodes to ro nodes if they are not in related resource group. 2. Add new incoming nodes into the replica if they are not in-used by other replicas of same collection. 3. replicas in same resource group will shared the nodes in resource group fairly.
func (*ReplicaManager) RemoveCollection ¶
func (m *ReplicaManager) RemoveCollection(ctx context.Context, collectionID typeutil.UniqueID) error
RemoveCollection removes replicas of given collection, returns error if failed to remove replica from KV
func (*ReplicaManager) RemoveNode ¶
func (m *ReplicaManager) RemoveNode(ctx context.Context, replicaID typeutil.UniqueID, nodes ...typeutil.UniqueID) error
RemoveNode removes the node from all replicas of given collection.
func (*ReplicaManager) RemoveReplicas ¶
type ReplicaSegDistFilter ¶
type ReplicaSegDistFilter struct {
*Replica
}
func (*ReplicaSegDistFilter) AddFilter ¶
func (f *ReplicaSegDistFilter) AddFilter(filter *segDistCriterion)
func (*ReplicaSegDistFilter) Match ¶
func (f *ReplicaSegDistFilter) Match(s *Segment) bool
type ResourceGroup ¶
type ResourceGroup struct {
// contains filtered or unexported fields
}
func NewResourceGroup ¶
func NewResourceGroup(name string, cfg *rgpb.ResourceGroupConfig, nodeMgr *session.NodeManager) *ResourceGroup
NewResourceGroup create resource group.
func NewResourceGroupFromMeta ¶
func NewResourceGroupFromMeta(meta *querypb.ResourceGroup, nodeMgr *session.NodeManager) *ResourceGroup
NewResourceGroupFromMeta create resource group from meta.
func (*ResourceGroup) AcceptNode ¶
func (rg *ResourceGroup) AcceptNode(nodeID int64) bool
return node and priority.
func (*ResourceGroup) ContainNode ¶
func (rg *ResourceGroup) ContainNode(id int64) bool
ContainNode return whether resource group contain node.
func (*ResourceGroup) CopyForWrite ¶
func (rg *ResourceGroup) CopyForWrite() *mutableResourceGroup
CopyForWrite return a mutable resource group.
func (*ResourceGroup) GetCapacity ¶
func (rg *ResourceGroup) GetCapacity() int
go:deprecated GetCapacity return resource group capacity.
func (*ResourceGroup) GetConfig ¶
func (rg *ResourceGroup) GetConfig() *rgpb.ResourceGroupConfig
GetConfig return resource group config. Do not change the config directly, use UpdateTxn to update config.
func (*ResourceGroup) GetConfigCloned ¶
func (rg *ResourceGroup) GetConfigCloned() *rgpb.ResourceGroupConfig
GetConfigCloned return a cloned resource group config.
func (*ResourceGroup) GetMeta ¶
func (rg *ResourceGroup) GetMeta() *querypb.ResourceGroup
GetMeta return resource group meta.
func (*ResourceGroup) GetName ¶
func (rg *ResourceGroup) GetName() string
GetName return resource group name.
func (*ResourceGroup) GetNodes ¶
func (rg *ResourceGroup) GetNodes() []int64
GetNodes return nodes of resource group which match required node labels
func (*ResourceGroup) HasFrom ¶
func (rg *ResourceGroup) HasFrom(rgName string) bool
HasFrom return whether given resource group is in `from` of rg.
func (*ResourceGroup) HasTo ¶
func (rg *ResourceGroup) HasTo(rgName string) bool
HasTo return whether given resource group is in `to` of rg.
func (*ResourceGroup) MeetRequirement ¶
func (rg *ResourceGroup) MeetRequirement() error
MeetRequirement return whether resource group meet requirement. Return error with reason if not meet requirement.
func (*ResourceGroup) MissingNumOfNodes ¶
func (rg *ResourceGroup) MissingNumOfNodes() int
MissingNumOfNodes return lack nodes count. `requests - NodeNum`
func (*ResourceGroup) NodeNum ¶
func (rg *ResourceGroup) NodeNum() int
NodeNum return node count of resource group which match required node labels
func (*ResourceGroup) OversizedNumOfNodes ¶
func (rg *ResourceGroup) OversizedNumOfNodes() int
OversizedNumOfNodes return oversized nodes count. `NodeNum - requests`
func (*ResourceGroup) ReachLimitNumOfNodes ¶
func (rg *ResourceGroup) ReachLimitNumOfNodes() int
ReachLimitNumOfNodes return reach limit nodes count. `limits - NodeNum`
func (*ResourceGroup) RedundantNumOfNodes ¶
func (rg *ResourceGroup) RedundantNumOfNodes() int
RedundantOfNodes return redundant nodes count. `len(node) - limits` or len(dirty_nodes)
func (*ResourceGroup) SelectNodeForRG ¶
func (rg *ResourceGroup) SelectNodeForRG(targetRG *ResourceGroup) int64
func (*ResourceGroup) Snapshot ¶
func (rg *ResourceGroup) Snapshot() *ResourceGroup
Snapshot return a snapshot of resource group.
type ResourceManager ¶
type ResourceManager struct {
// contains filtered or unexported fields
}
func NewResourceManager ¶
func NewResourceManager(catalog metastore.QueryCoordCatalog, nodeMgr *session.NodeManager) *ResourceManager
NewResourceManager is used to create a ResourceManager instance.
func (*ResourceManager) AddResourceGroup ¶
func (rm *ResourceManager) AddResourceGroup(ctx context.Context, rgName string, cfg *rgpb.ResourceGroupConfig) error
AddResourceGroup create a new ResourceGroup. Do no changed with node, all node will be reassign to new resource group by auto recover.
func (*ResourceManager) AssignPendingIncomingNode ¶
func (rm *ResourceManager) AssignPendingIncomingNode(ctx context.Context)
AssignPendingIncomingNode assign incoming node to resource group.
func (*ResourceManager) AutoRecoverResourceGroup ¶
func (rm *ResourceManager) AutoRecoverResourceGroup(ctx context.Context, rgName string) error
AutoRecoverResourceGroup auto recover rg, return recover used node num
func (*ResourceManager) CheckIncomingNodeNum ¶
func (rm *ResourceManager) CheckIncomingNodeNum(ctx context.Context) int
CheckIncomingNodeNum return incoming node num.
func (*ResourceManager) ContainResourceGroup ¶
func (rm *ResourceManager) ContainResourceGroup(ctx context.Context, rgName string) bool
ContainResourceGroup return whether given resource group is exist.
func (*ResourceManager) ContainsNode ¶
ContainsNode return whether given node is in given resource group.
func (*ResourceManager) GetNodesOfMultiRG ¶
func (rm *ResourceManager) GetNodesOfMultiRG(ctx context.Context, rgName []string) (map[string]typeutil.UniqueSet, error)
GetNodesOfMultiRG return nodes of multi rg, it can be used to get a consistent view of nodes of multi rg.
func (*ResourceManager) GetOutgoingNodeNumByReplica ¶
func (rm *ResourceManager) GetOutgoingNodeNumByReplica(ctx context.Context, replica *Replica) map[string]int32
GetOutgoingNodeNumByReplica return outgoing node num on each rg from this replica.
func (*ResourceManager) GetResourceGroup ¶
func (rm *ResourceManager) GetResourceGroup(ctx context.Context, rgName string) *ResourceGroup
GetResourceGroup return resource group snapshot by name.
func (*ResourceManager) GetResourceGroupsJSON ¶
func (rm *ResourceManager) GetResourceGroupsJSON(ctx context.Context) string
func (*ResourceManager) HandleNodeDown ¶
func (rm *ResourceManager) HandleNodeDown(ctx context.Context, node int64)
HandleNodeDown handle the node when node is leave.
func (*ResourceManager) HandleNodeStopping ¶
func (rm *ResourceManager) HandleNodeStopping(ctx context.Context, node int64)
func (*ResourceManager) HandleNodeUp ¶
func (rm *ResourceManager) HandleNodeUp(ctx context.Context, node int64)
HandleNodeUp handle node when new node is incoming.
func (*ResourceManager) ListResourceGroups ¶
func (rm *ResourceManager) ListResourceGroups(ctx context.Context) []string
ListResourceGroups return all resource groups names.
func (*ResourceManager) ListenNodeChanged ¶
func (rm *ResourceManager) ListenNodeChanged(ctx context.Context) *syncutil.VersionedListener
ListenNodeChanged return a listener for node changed.
func (*ResourceManager) ListenResourceGroupChanged ¶
func (rm *ResourceManager) ListenResourceGroupChanged(ctx context.Context) *syncutil.VersionedListener
ListenResourceGroupChanged return a listener for resource group changed.
func (*ResourceManager) MeetRequirement ¶
func (rm *ResourceManager) MeetRequirement(ctx context.Context, rgName string) error
MeetRequirement return whether resource group meet requirement. Return error with reason if not meet requirement.
func (*ResourceManager) Recover ¶
func (rm *ResourceManager) Recover(ctx context.Context) error
Recover recover resource group from meta, other interface of ResourceManager can be only called after recover is done.
func (*ResourceManager) RemoveResourceGroup ¶
func (rm *ResourceManager) RemoveResourceGroup(ctx context.Context, rgName string) error
RemoveResourceGroup remove resource group.
func (*ResourceManager) TransferNode ¶
func (rm *ResourceManager) TransferNode(ctx context.Context, sourceRGName string, targetRGName string, nodeNum int) error
go:deprecated TransferNode transfer node from source resource group to target resource group. Deprecated, use Declarative API `UpdateResourceGroups` instead.
func (*ResourceManager) UpdateResourceGroups ¶
func (rm *ResourceManager) UpdateResourceGroups(ctx context.Context, rgs map[string]*rgpb.ResourceGroupConfig) error
UpdateResourceGroups update resource group configuration. Only change the configuration, no change with node. all node will be reassign by auto recover.
func (*ResourceManager) VerifyNodeCount ¶
func (rm *ResourceManager) VerifyNodeCount(ctx context.Context, requiredNodeCount map[string]int) error
GetResourceGroupByNodeID return whether resource group's node match required node count
type Segment ¶
type Segment struct { *datapb.SegmentInfo Node int64 // Node the segment is in Version int64 // Version is the timestamp of loading segment LastDeltaTimestamp uint64 // The timestamp of the last delta record IndexInfo map[int64]*querypb.FieldIndexInfo // index info of loaded segment }
func SegmentFromInfo ¶
func SegmentFromInfo(info *datapb.SegmentInfo) *Segment
type SegmentDistFilter ¶
func WithChannel ¶
func WithChannel(channelName string) SegmentDistFilter
func WithCollectionID ¶
func WithCollectionID(collectionID typeutil.UniqueID) SegmentDistFilter
func WithNodeID ¶
func WithNodeID(nodeID int64) SegmentDistFilter
func WithReplica ¶
func WithReplica(replica *Replica) SegmentDistFilter
func WithSegmentID ¶
func WithSegmentID(segmentID int64) SegmentDistFilter
type SegmentDistFilterFunc ¶
func (SegmentDistFilterFunc) AddFilter ¶
func (f SegmentDistFilterFunc) AddFilter(filter *segDistCriterion)
func (SegmentDistFilterFunc) Match ¶
func (f SegmentDistFilterFunc) Match(s *Segment) bool
type SegmentDistManager ¶
type SegmentDistManager struct {
// contains filtered or unexported fields
}
func NewSegmentDistManager ¶
func NewSegmentDistManager() *SegmentDistManager
func (*SegmentDistManager) GetByFilter ¶
func (m *SegmentDistManager) GetByFilter(filters ...SegmentDistFilter) []*Segment
GetByFilter return segment list which match all given filters
func (*SegmentDistManager) GetSegmentDist ¶
func (m *SegmentDistManager) GetSegmentDist(collectionID int64) []*metricsinfo.Segment
type TargetManager ¶
type TargetManager struct {
// contains filtered or unexported fields
}
func NewTargetManager ¶
func NewTargetManager(broker Broker, meta *Meta) *TargetManager
func (*TargetManager) CanSegmentBeMoved ¶
func (mgr *TargetManager) CanSegmentBeMoved(ctx context.Context, collectionID, segmentID int64) bool
if segment isn't l0 segment, and exist in current/next target, then it can be moved
func (*TargetManager) GetCollectionTargetVersion ¶
func (mgr *TargetManager) GetCollectionTargetVersion(ctx context.Context, collectionID int64, scope TargetScope) int64
func (*TargetManager) GetDmChannel ¶
func (mgr *TargetManager) GetDmChannel(ctx context.Context, collectionID int64, channel string, scope TargetScope) *DmChannel
func (*TargetManager) GetDmChannelsByCollection ¶
func (mgr *TargetManager) GetDmChannelsByCollection(ctx context.Context, collectionID int64, scope TargetScope) map[string]*DmChannel
func (*TargetManager) GetDroppedSegmentsByChannel ¶
func (mgr *TargetManager) GetDroppedSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope TargetScope, ) []int64
func (*TargetManager) GetGrowingSegmentsByChannel ¶
func (mgr *TargetManager) GetGrowingSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope TargetScope, ) typeutil.UniqueSet
func (*TargetManager) GetGrowingSegmentsByCollection ¶
func (mgr *TargetManager) GetGrowingSegmentsByCollection(ctx context.Context, collectionID int64, scope TargetScope, ) typeutil.UniqueSet
func (*TargetManager) GetSealedSegment ¶
func (mgr *TargetManager) GetSealedSegment(ctx context.Context, collectionID int64, id int64, scope TargetScope) *datapb.SegmentInfo
func (*TargetManager) GetSealedSegmentsByChannel ¶
func (mgr *TargetManager) GetSealedSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope TargetScope, ) map[int64]*datapb.SegmentInfo
func (*TargetManager) GetSealedSegmentsByCollection ¶
func (mgr *TargetManager) GetSealedSegmentsByCollection(ctx context.Context, collectionID int64, scope TargetScope, ) map[int64]*datapb.SegmentInfo
func (*TargetManager) GetSealedSegmentsByPartition ¶
func (mgr *TargetManager) GetSealedSegmentsByPartition(ctx context.Context, collectionID int64, partitionID int64, scope TargetScope, ) map[int64]*datapb.SegmentInfo
func (*TargetManager) GetTargetJSON ¶
func (mgr *TargetManager) GetTargetJSON(ctx context.Context, scope TargetScope) string
func (*TargetManager) IsCurrentTargetExist ¶
func (*TargetManager) IsNextTargetExist ¶
func (mgr *TargetManager) IsNextTargetExist(ctx context.Context, collectionID int64) bool
func (*TargetManager) Recover ¶
func (mgr *TargetManager) Recover(ctx context.Context, catalog metastore.QueryCoordCatalog) error
func (*TargetManager) RemoveCollection ¶
func (mgr *TargetManager) RemoveCollection(ctx context.Context, collectionID int64)
RemoveCollection removes all channels and segments in the given collection
func (*TargetManager) RemovePartition ¶
func (mgr *TargetManager) RemovePartition(ctx context.Context, collectionID int64, partitionIDs ...int64)
RemovePartition removes all segment in the given partition, NOTE: this doesn't remove any channel even the given one is the only partition
func (*TargetManager) SaveCurrentTarget ¶
func (mgr *TargetManager) SaveCurrentTarget(ctx context.Context, catalog metastore.QueryCoordCatalog)
func (*TargetManager) UpdateCollectionCurrentTarget ¶
func (mgr *TargetManager) UpdateCollectionCurrentTarget(ctx context.Context, collectionID int64) bool
UpdateCollectionCurrentTarget updates the current target to next target, WARN: DO NOT call this method for an existing collection as target observer running, or it will lead to a double-update, which may make the current target not available
func (*TargetManager) UpdateCollectionNextTarget ¶
func (mgr *TargetManager) UpdateCollectionNextTarget(ctx context.Context, collectionID int64) error
UpdateCollectionNextTarget updates the next target with new target pulled from DataCoord, WARN: DO NOT call this method for an existing collection as target observer running, or it will lead to a double-update, which may make the current target not available
type TargetManagerInterface ¶
type TargetManagerInterface interface { UpdateCollectionCurrentTarget(ctx context.Context, collectionID int64) bool UpdateCollectionNextTarget(ctx context.Context, collectionID int64) error RemoveCollection(ctx context.Context, collectionID int64) RemovePartition(ctx context.Context, collectionID int64, partitionIDs ...int64) GetGrowingSegmentsByCollection(ctx context.Context, collectionID int64, scope TargetScope) typeutil.UniqueSet GetGrowingSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope TargetScope) typeutil.UniqueSet GetSealedSegmentsByCollection(ctx context.Context, collectionID int64, scope TargetScope) map[int64]*datapb.SegmentInfo GetSealedSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope TargetScope) map[int64]*datapb.SegmentInfo GetDroppedSegmentsByChannel(ctx context.Context, collectionID int64, channelName string, scope TargetScope) []int64 GetSealedSegmentsByPartition(ctx context.Context, collectionID int64, partitionID int64, scope TargetScope) map[int64]*datapb.SegmentInfo GetDmChannelsByCollection(ctx context.Context, collectionID int64, scope TargetScope) map[string]*DmChannel GetDmChannel(ctx context.Context, collectionID int64, channel string, scope TargetScope) *DmChannel GetSealedSegment(ctx context.Context, collectionID int64, id int64, scope TargetScope) *datapb.SegmentInfo GetCollectionTargetVersion(ctx context.Context, collectionID int64, scope TargetScope) int64 IsCurrentTargetExist(ctx context.Context, collectionID int64, partitionID int64) bool IsNextTargetExist(ctx context.Context, collectionID int64) bool SaveCurrentTarget(ctx context.Context, catalog metastore.QueryCoordCatalog) Recover(ctx context.Context, catalog metastore.QueryCoordCatalog) error CanSegmentBeMoved(ctx context.Context, collectionID, segmentID int64) bool GetTargetJSON(ctx context.Context, scope TargetScope) string }
type TargetScope ¶
type TargetScope = int32
const ( CurrentTarget TargetScope = iota + 1 NextTarget CurrentTargetFirst NextTargetFirst )
Source Files ¶
- channel_dist_manager.go
- collection_manager.go
- constant.go
- coordinator_broker.go
- dist_manager.go
- failed_load_cache.go
- leader_view_manager.go
- meta.go
- mock_broker.go
- mock_target_manager.go
- replica.go
- replica_manager.go
- replica_manager_helper.go
- resource_group.go
- resource_manager.go
- segment_dist_manager.go
- target.go
- target_manager.go