package
19.1.0-beta.20190304+incompatible
Repository: https://github.com/darinpp/cockroach.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
Package closedts houses the interfaces and basic definitions used by the various components of the closed timestamp subsystems.
No description provided by the author
Package copysets proves an implementation of copysets presented in https://web.stanford.edu/~skatti/pubs/usenix13-copysets.pdf.
No description provided by the author
Package engine provides low-level storage.
No description provided by the author
No description provided by the author
Package raftentry provides a cache for entries to avoid extra deserializations.
No description provided by the author
No description provided by the author
Package spanlatch provides a latch management structure for serializing access to keys and key ranges.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

Bootstrap writes a new store ident to the underlying engine.
DecodeRaftCommand splits a raftpb.Entry.Data into its commandID and command portions.
EnableLeaseHistory turns on the lease history for testing purposes.
GetNeededReplicas calculates the number of replicas a range should have given its zone config and the number of nodes available for up-replication (i.e.
HasRaftLeader returns true if the raft group has a raft leader currently.
IsSnapshotError returns true iff the error indicates a preemptive snapshot failed.
IterateIDPrefixKeys helps visit system keys that use RangeID prefixing ( such as RaftHardStateKey, RaftTombstoneKey, and many others).
IterateRangeDescriptors calls the provided function with each descriptor from the provided Engine.
MakeAllocator creates a new allocator using the specified StorePool.
MakeServer returns a new instance of Server.
MakeStorePoolNodeLivenessFunc returns a function which determines the status of a node based on information provided by the specified NodeLiveness.
NewDummyRaftTransport returns a dummy raft transport for use in tests which need a non-nil raft transport that need not function.
No description provided by the author
NewNodeLiveness returns a new instance of NodeLiveness configured with the specified gossip instance.
No description provided by the author
NewRaftTransport creates a new RaftTransport.
NewReplica initializes the replica using the given metadata.
NewReplicaEvalContext returns a batcheval.EvalContext to use for command evaluation.
NewStore returns a new instance of a store.
NewStorePool creates a StorePool and registers the store updating callback with gossip.
NewStoreRebalancer creates a StoreRebalancer to work in tandem with the provided replicateQueue.
NewStores returns a local-only sender which directly accesses a collection of stores.
ReadClusterVersion reads the the cluster version from the store-local version key.
ReadHLCUpperBound returns the upper bound to the wall time of the HLC If this value does not exist 0 is returned.
ReadMaxHLCUpperBound returns the maximum of the stored hlc upper bounds among all the engines.
ReadStoreIdent reads the StoreIdent from the store.
ReadVersionFromEngineOrDefault reads the persisted cluster version from the engine, falling back to v1.0 if no version is specified on the engine.
No description provided by the author
No description provided by the author
RunGC runs garbage collection for the specified descriptor on the provided Engine (which is not mutated).
SetImportCmd allows setting the function that will be called as the implementation of the Import command.
SynthesizeClusterVersionFromEngines implements the core of (*Stores).SynthesizeClusterVersion.
TestStoreConfig has some fields initialized with values relevant in tests.
TrackRaftProtos instruments proto marshaling to track protos which are marshaled downstream of raft.
WriteClusterVersion writes the given cluster version to the store-local cluster version key.
WriteClusterVersionToEngines writes the given version to the given engines, without any sanity checks.

# Constants

These are the possible allocator actions.
These are the possible allocator actions.
These are the possible allocator actions.
These are the possible allocator actions.
These are the possible allocator actions.
These are the possible allocator actions.
IntersectingSnapshotMsg is part of the error message returned from canApplySnapshotLocked and is exposed here so testing can rely on it.
LBRebalancingLeasesAndReplicas means that we rebalance both leases and replicas based on store-level QPS imbalances.
LBRebalancingLeasesOnly means that we rebalance leases based on store-level QPS imbalances.
LBRebalancingOff means that we do not do store-level rebalancing based on load statistics.
4MB.
MaxQuotaReplicaLivenessDuration is the maximum duration that a replica can remain inactive while still being counting against the range's available proposal quota.
MinStatsDuration defines a lower bound on how long users of replica stats should wait before using those stats for anything.
RaftLogQueueStaleSize is the minimum size of the Raft log that we'll truncate even if there are fewer than RaftLogQueueStaleThreshold entries to truncate.
RaftLogQueueStaleThreshold is the minimum threshold for stale raft log entries.
ReplicaGCQueueCandidateTimeout is the duration after which a range in candidate Raft state (which is a typical sign of having been removed from the group) will be considered for garbage collection.
10 days.
KV_BATCH snapshots stream batches of KV pairs for all keys in a range from the sender the the receiver.
REBALANCE is used for snapshots involved in rebalancing.
RECOVERY is used for a Raft-initiated snapshots and for up-replication snapshots (i.e.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TestTimeUntilStoreDead is the test value for TimeUntilStoreDead to quickly mark stores as dead.
TestTimeUntilStoreDeadOff is the test value for TimeUntilStoreDead that prevents the store pool from marking stores as dead.
daily.
8MB.

# Variables

DeclinedReservationsTimeout specifies a duration during which the local replicate queue will not consider stores which have rejected a reservation a viable target.
ErrEpochIncremented is returned when a heartbeat request fails because the underlying liveness record has had its epoch incremented.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrNoLivenessRecord is returned when asking for liveness information about a node for which nothing is known.
ExportRequestsLimit is the number of Export requests that can run at once.
FailedReservationsTimeout specifies a duration during which the local replicate queue will not consider stores which have failed a reservation a viable target.
FollowerReadsEnabled controls whether replicas attempt to serve follower reads.
LoadBasedRebalancingMode controls whether range rebalancing takes additional variables such as write load and disk usage into account.
MaxCommandSize wraps "kv.raft.command.max_size".
MergeQueueInterval is a setting that controls how often the merge queue waits between processing replicas.
MinLeaseTransferStatsDuration configures the minimum amount of time a replica must wait for stats about request counts to accumulate before making decisions based on them.
RangefeedEnabled is a cluster setting that enables rangefeed requests.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SplitByLoadEnabled wraps "kv.range_split.by_load_enabled".
SplitByLoadQPSThreshold wraps "kv.range_split.load_qps_threshold".
TimeUntilStoreDead wraps "server.time_until_store_dead".

# Structs

Allocator tries to spread replicas as evenly as possible across the stores in the cluster.
A CollectChecksumRequest asks the addressed replica for the result of a roachpb.ComputeChecksumRequest.
No description provided by the author
ConfChangeContext is encoded in the raftpb.ConfChange.Context field.
A ConsistencyCheckResult contains the outcome of a CollectChecksum call.
ConsistencyTestingKnobs is a BatchEvalTestingKnobs struct used to control the behavior of the consistency checker for tests.
GCInfo contains statistics and insights from a GC run.
GCThreshold holds the key and txn span GC thresholds, respectively.
HotReplicaInfo contains a range descriptor and its QPS.
IncomingSnapshot contains the data for an incoming streaming snapshot message.
IsLiveMapEntry encapsulates data about current liveness for a node.
LivenessMetrics holds metrics for use with node liveness activity.
NodeLiveness encapsulates information on node liveness and provides an API for querying, updating, and invalidating node liveness.
NoopGCer implements GCer by doing nothing.
A NotBootstrappedError indicates that an engine has not yet been bootstrapped due to a store identifier not being present.
OutgoingSnapshot contains the data required to stream a snapshot to a recipient.
ProposalData is data about a command which allows it to be evaluated, proposed to raft, and for the result of the command to be returned to the caller.
RaftHeartbeat is a request that contains the barebones information for a raftpb.MsgHeartbeat raftpb.Message.
RaftMessageRequest is the request used to send raft messages using our protobuf-based RPC codec.
No description provided by the author
RaftMessageResponse may be sent to the sender of a RaftMessageRequest.
No description provided by the author
RaftTransport handles the rpc messages for raft.
RangeInfo contains the information needed by the allocator to make rebalancing decisions for a given range.
RemoveOptions bundles boolean parameters for Store.RemoveReplica.
A Replica is a contiguous keyspace with writes managed via an instance of the Raft consensus algorithm.
ReplicaChecksum contains progress on a replica checksum computation.
ReplicaGCQueueMetrics is the set of metrics for the replica GC queue.
ReplicaMetrics contains details on the current status of the replica.
ReplicaPlaceholder is created by a Store in anticipation of replacing it at some point in the future with a Replica.
ReplicaSnapshotDiff is a part of a []ReplicaSnapshotDiff which represents a diff between two replica snapshots.
ReplicateQueueMetrics is the set of metrics for the replicate queue.
Server implements PerReplicaServer.
SnapshotRequest is the request used to send streaming snapshot requests.
No description provided by the author
No description provided by the author
SpanSetReplicaEvalContext is a testing-only implementation of ReplicaEvalContext which verifies that access to state is registered in the SpanSet if one is given.
A Store maintains a map of ranges by start key.
A StoreConfig encompasses the auxiliary objects and configuration required to create a store.
StoreKeySpanStats carries the result of a stats computation over a key range.
StoreList holds a list of store descriptors and associated count and used stats for those stores.
StoreMetrics is the set of metrics for a given store.
StorePool maintains a list of all known stores in the cluster and information on their health.
StoreRebalancer is responsible for examining how the associated store's load compares to the load on other stores in the cluster and transferring leases or replicas away if the local store is overloaded.
StoreRebalancerMetrics is the set of metrics for the store-level rebalancer.
StoreRequestHeader locates a Store on a Node.
Stores provides methods to access a collection of stores.
StoreTestingKnobs is a part of the context used to control parts of the system.
WaitForApplicationRequest blocks until the addressed replica has applied the command with the specified lease index.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

A GCer is an abstraction used by the GC queue to carry out chunked deletions.
KeyRange is an interface type for the replicasByKey BTree, to compare Replica and ReplicaPlaceholder.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MultiRaftClient is the client API for MultiRaft service.
MultiRaftServer is the server API for MultiRaft service.
PerReplicaClient is the client API for PerReplica service.
PerReplicaServer is the server API for PerReplica service.
RaftMessageHandler is the interface that must be implemented by arguments to RaftTransport.Listen.
RaftMessageResponseStream is the subset of the MultiRaft_RaftMessageServer interface that is needed for sending responses.
SnapshotResponseStream is the subset of the MultiRaft_RaftSnapshotServer interface that is needed for sending responses.
SnapshotStorePool narrows StorePool to make sendSnapshot easier to test.
TimeSeriesDataStore is an interface defined in the storage package that can be implemented by the higher-level time series system.

# Type aliases

AllocatorAction enumerates the various replication adjustments that may be recommended by the allocator.
DestroyReason indicates if a replica is alive, destroyed, corrupted or pending destruction.
HeartbeatCallback is invoked whenever this node updates its own liveness status, indicating that it is alive.
ImportCmdFunc is the type of the function that will be called as the implementation of the Import command.
IsLiveCallback is invoked when a node's IsLive state changes to true.
IsLiveMap is a type alias for a map from NodeID to IsLiveMapEntry.
LBRebalancingMode controls if and when we do store-level rebalancing based on load.
The NodeCountFunc returns a count of the total number of nodes the user intends for their to be in the cluster.
A NodeLivenessFunc accepts a node ID, current time and threshold before a node is considered dead and returns whether or not the node is live.
ReplicaSnapshotDiffSlice groups multiple ReplicaSnapshotDiff records and exposes a formatting helper.
No description provided by the author
No description provided by the author
No description provided by the author