package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
GlobalRandSource returns an implementation of the RandSource interface that redirects calls to the global rand.
Init initializes a Decider (which is assumed to be zero).
NewUnweightedFinder initiates a UnweightedFinder with the given time.
NewWeightedFinder initiates a WeightedFinder with the given time.
# Constants
10s.
SplitCPU will track and split CPU (cpu-per-second) over a range.
SplitQPS will track and split QPS (queries-per-second) over a range.
# Structs
Decider tracks the latest load and if certain conditions are met, records incoming requests to find potential split keys and checks if sampled candidate split keys satisfy certain requirements.
LoadSplitSnapshot contains a consistent snapshot of the decider state.
LoadSplitterMetrics consists of metrics for load-based splitter split key.
UnweightedFinder is a structure that is used to determine the split point using the Reservoir Sampling method.
WeightedFinder is a structure that is used to determine the split point using the Weighted Reservoir Sampling method (a simplified version of A-Chao algorithm).
# Type aliases
SplitObjective is a type that specifies a load based splitting objective.