package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
ClearRangeData clears the data associated with a range descriptor selected by the provided options.
CreateUninitializedReplica creates an uninitialized replica in storage.
DestroyReplica destroys all or a part of the Replica's state, installing a RangeTombstone in its place.
InitEngine writes a new store ident to the underlying engine.
IterateIDPrefixKeys helps visit system keys that use RangeID prefixing (such as RaftHardStateKey, RangeTombstoneKey, and many others).
IterateRangeDescriptorsFromDisk discovers the initialized replicas and calls the provided function with each such descriptor from the provided Engine.
LoadAndReconcileReplicas loads the Replicas present on this store.
LoadReplicaState loads the state necessary to create a Replica with the specified range descriptor, which can be either initialized or uninitialized.
ReadStoreIdent reads the StoreIdent from the store.
SynthesizeClusterVersionFromEngines returns the cluster version that was read from the engines or, if none are initialized, binaryMinSupportedVersion.
WriteClusterVersion writes the given cluster version to the min version file.
WriteClusterVersionToEngines writes the given version to the given engines, Returns nil on success; otherwise returns first error encountered writing to the stores.
# Constants
ClearRangeThresholdPointKeys is the threshold (as number of point keys) beyond which we'll clear range data using a Pebble range tombstone rather than individual Pebble point tombstones.
ClearRangeThresholdRangeKeys is the threshold (as number of range keys) beyond which we'll clear range data using a single RANGEKEYDEL across the span rather than clearing individual range keys.
FirstNodeID is the NodeID assigned to the node bootstrapping a new cluster.
FirstStoreID is the StoreID assigned to the first store on the node with ID FirstNodeID.
# Structs
ClearRangeDataOptions specify which parts of a Replica are to be destroyed.
LoadedReplicaState represents the state of a Replica loaded from storage, and is used to initialize the in-memory Replica instance.
A NotBootstrappedError indicates that an engine has not yet been bootstrapped due to a store identifier not being present.
A Replica references a CockroachDB Replica.