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.
Click to show internal directories.
Click to hide internal directories.