package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
NewErrAllocatorToken returns a new ErrAllocatorToken with the holder initialized to the argument supplied.
NewLeasePlanner returns a new LeasePlanner which implements the ReplicationPlanner interface.
NewReplicaPlanner returns a new ReplicaPlanner which implements the ReplicationPlanner interface.
ReplicationChangesForRebalance returns a list of ReplicationChanges to execute for a rebalancing decision made by the allocator.
# Structs
AllocationChangeReplicasOp represents an operation to execute a change replicas txn.
AllocationFinalizeAtomicReplicationOp represents an operation to finalize an atomic change replicas operation and remove any remaining learners.
AllocationNoop represents no operation.
AllocationTransferLeaseOp represents an operation to transfer a range lease to another store, from the current one.
AllocatorToken is a token which provides mutual exclusion for allocator execution.
CantTransferLeaseViolatingPreferencesError is an error returned when a lease violates the lease preferences, but we couldn't find a valid target to transfer the lease to.
ErrAllocatorToken is an error returned when an allocator token acquisition fails.
LeasePlanner implements the ReplicationPlanner interface.
PlannerOptions declares a set of options that can be set when calling planner methods.
ReplicaPlanner implements the ReplicationPlanner interface.
ReplicaPlannerTestingKnobs declares the set of knobs that can be used in testing the replica planner.
ReplicateStats tracks the replication planning statistics for number of replicas added, removed and so on; for the different types of replicas and replica states.
# Interfaces
AllocationOp represents an atomic allocation operation to be applied against a specific replica.
AllocatorReplica contains methods used for planning changes for the range a replica belongs to.
LeaseCheckReplica contains methods that may be used to check a replica's lease.
ReplicationPlanner provides methods to plan replication changes for a single range, given the replica for that range.