observers

package
v0.10.3-0...-74752f2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpdateCollection targetOp = iota + 1
	ReleaseCollection
	ReleasePartition
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectionObserver

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

func NewCollectionObserver

func NewCollectionObserver(
	dist *meta.DistributionManager,
	meta *meta.Meta,
	targetMgr meta.TargetManagerInterface,
	targetObserver *TargetObserver,
	checherController *checkers.CheckerController,
	proxyManager proxyutil.ProxyClientManagerInterface,
) *CollectionObserver

func (*CollectionObserver) LoadCollection

func (ob *CollectionObserver) LoadCollection(ctx context.Context, collectionID int64)

func (*CollectionObserver) LoadPartitions

func (ob *CollectionObserver) LoadPartitions(ctx context.Context, collectionID int64, partitionIDs []int64)

func (*CollectionObserver) Observe

func (ob *CollectionObserver) Observe(ctx context.Context)

func (*CollectionObserver) Start

func (ob *CollectionObserver) Start()

func (*CollectionObserver) Stop

func (ob *CollectionObserver) Stop()

type CollectionShardLeaderCache

type CollectionShardLeaderCache = map[string]*querypb.ShardLeadersList

type LeaderCacheObserver

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

LeaderCacheObserver is to invalidate shard leader cache when leader location changes

func NewLeaderCacheObserver

func NewLeaderCacheObserver(
	proxyManager proxyutil.ProxyClientManagerInterface,
) *LeaderCacheObserver

func (*LeaderCacheObserver) HandleEvent

func (o *LeaderCacheObserver) HandleEvent(ctx context.Context, collectionIDs ...int64)

func (*LeaderCacheObserver) RegisterEvent

func (o *LeaderCacheObserver) RegisterEvent(events ...int64)

func (*LeaderCacheObserver) Start

func (o *LeaderCacheObserver) Start(ctx context.Context)

func (*LeaderCacheObserver) Stop

func (o *LeaderCacheObserver) Stop()

type LoadTask

type LoadTask struct {
	LoadType     querypb.LoadType
	CollectionID int64
	PartitionIDs []int64
}

type ReplicaObserver

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

check replica, find read only nodes and remove it from replica if all segment/channel has been moved

func NewReplicaObserver

func NewReplicaObserver(meta *meta.Meta, distMgr *meta.DistributionManager) *ReplicaObserver

func (*ReplicaObserver) Start

func (ob *ReplicaObserver) Start()

func (*ReplicaObserver) Stop

func (ob *ReplicaObserver) Stop()

type ResourceObserver

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

ResourceObserver is used to observe resource group status. Recover resource group into expected configuration.

func NewResourceObserver

func NewResourceObserver(meta *meta.Meta) *ResourceObserver

func (*ResourceObserver) Start

func (ob *ResourceObserver) Start()

func (*ResourceObserver) Stop

func (ob *ResourceObserver) Stop()

type TargetObserver

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

func NewTargetObserver

func NewTargetObserver(
	meta *meta.Meta,
	targetMgr meta.TargetManagerInterface,
	distMgr *meta.DistributionManager,
	broker meta.Broker,
	cluster session.Cluster,
	nodeMgr *session.NodeManager,
) *TargetObserver

func (*TargetObserver) Check

func (ob *TargetObserver) Check(ctx context.Context, collectionID int64, partitionID int64) bool

Check whether provided collection is has current target. If not, submit an async task into dispatcher.

func (*TargetObserver) ReleaseCollection

func (ob *TargetObserver) ReleaseCollection(collectionID int64)

func (*TargetObserver) ReleasePartition

func (ob *TargetObserver) ReleasePartition(collectionID int64, partitionID ...int64)

func (*TargetObserver) Start

func (ob *TargetObserver) Start()

func (*TargetObserver) Stop

func (ob *TargetObserver) Stop()

func (*TargetObserver) TriggerUpdateCurrentTarget

func (ob *TargetObserver) TriggerUpdateCurrentTarget(collectionID int64)

func (*TargetObserver) UpdateNextTarget

func (ob *TargetObserver) UpdateNextTarget(collectionID int64) (chan struct{}, error)

UpdateNextTarget updates the next target, returns a channel which will be closed when the next target is ready, or returns error if failed to pull target

Jump to

Keyboard shortcuts

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