tiflash

package
v1.1.0-beta.0...-14a469a Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AllReplicaStr is the string value of AllReplicas.
	AllReplicaStr = "all_replicas"
	// ClosestAdaptiveStr is the string value of ClosestAdaptive.
	ClosestAdaptiveStr = "closest_adaptive"
	// ClosestReplicasStr is the string value of ClosestReplicas.
	ClosestReplicasStr = "closest_replicas"
)
View Source
const (
	// MaxRemoteReadCountPerNodeForClosestReplicas is the max remote read count per node for "closest_replicas".
	MaxRemoteReadCountPerNodeForClosestReplicas = 3
)

Variables

This section is empty.

Functions

func GetTiFlashReplicaRead

func GetTiFlashReplicaRead(policy ReplicaRead) string

GetTiFlashReplicaRead return corresponding policy string in integer.

Types

type ReplicaRead

type ReplicaRead int

ReplicaRead is the policy to select TiFlash nodes.

const (
	// AllReplicas  means using all the available nodes to do analytic computing, regardless of local zone or other zones.
	AllReplicas ReplicaRead = iota
	// ClosestAdaptive means using the nodes in the same zone as the entry TiDB. If not all the tiflash data can be accessed, the query will involve the tiflash nodes from other zones.
	ClosestAdaptive
	// ClosestReplicas means using only the nodes in the same zone as the entry TiDB. If not all the tiflash data can be accessed, the query will report an error, and show an error message. Because of the feature of TiFlash remote read, a small number of regions  in other zones is acceptable, but performance will be affected. The threshold is fixed, 3 regions per tiflash node.
	ClosestReplicas
)

func GetTiFlashReplicaReadByStr

func GetTiFlashReplicaReadByStr(str string) ReplicaRead

GetTiFlashReplicaReadByStr return corresponding policy in string.

func (ReplicaRead) IsAllReplicas

func (policy ReplicaRead) IsAllReplicas() bool

IsAllReplicas return whether the policy is AllReplicas.

func (ReplicaRead) IsClosestReplicas

func (policy ReplicaRead) IsClosestReplicas() bool

IsClosestReplicas return whether the policy is ClosestReplicas.

Jump to

Keyboard shortcuts

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