checker

package
v0.0.0-...-b3bb260 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReplicaChecker

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

ReplicaChecker ensures region has the best replicas. Including the following: Replica number management. Unhealthy replica management, mainly used for disaster recovery of TiKV. Location management, mainly used for cross data center deployment.

func NewReplicaChecker

func NewReplicaChecker(cluster opt.Cluster, n ...string) *ReplicaChecker

NewReplicaChecker creates a replica checker.

func (*ReplicaChecker) Check

func (r *ReplicaChecker) Check(region *core.RegionInfo) *operator.Operator

Check verifies a region's replicas, creating an operator.Operator if need.

func (*ReplicaChecker) SelectBestReplacementStore

func (r *ReplicaChecker) SelectBestReplacementStore(region *core.RegionInfo, oldPeer *metapb.Peer, filters ...filter.Filter) uint64

SelectBestReplacementStore returns a store id that to be used to replace the old peer and distinct score.

Jump to

Keyboard shortcuts

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