package
2.1.0-alpha.20180416+incompatible
Repository: https://github.com/coyle/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 engine provides low-level storage.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package storagebase is a generated protocol buffer package.
No description provided by the author
No description provided by the author

# Functions

DecodeRaftCommand splits a raftpb.Entry.Data into its commandID and command portions.
EnableLeaseHistory turns on the lease history for testing purposes.
GossipAddressResolver is a thin wrapper around gossip's GetNodeIDAddress that allows its return value to be used as the net.Addr interface.
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.
NewCommandQueue returns a new command queue.
No description provided by the author
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.
NewReplicaCorruptionError creates a new error indicating a corrupt replica, with the supplied list of errors given as history.
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.
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.
TestingRelocateRange relocates a given range to a given set of stores.
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.
ERROR indicates that the lease can't be used or acquired.
EXPIRED indicates that the lease can't be used.
PROSCRIBED indicates that the lease's proposed timestamp is earlier than allowed.
STASIS indicates that the lease has not expired, but can't be used.
VALID indicates that the lease can be used.
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.
DEAD indicates the node is considered dead.
DECOMMISSIONED indicates a node that has finished the decommissioning process.
DECOMMISSIONING indicates a node that is in the decommissioning process.
LIVE indicates a live node.
UNAVAILABLE indicates that the node is unavailable - it has not updated its liveness record recently enough to be considered live, but has not been unavailable long enough to be considered dead.
No description provided by the author
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.
Add is the event type recorded when a range adds a new replica.
Remove is the event type recorded when a range removed an existing replica.
These are lower case to maintain compatibility with how they were originally stored.
The set of possible reasons for range events to happen.
The set of possible reasons for range events to happen.
The set of possible reasons for range events to happen.
The set of possible reasons for range events to happen.
The set of possible reasons for range events to happen.
The set of possible reasons for range events to happen.
The set of possible reasons for range events to happen.
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.
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.

# Variables

EnableStatsBasedRebalancing controls whether range rebalancing takes additional variables such as write load and disk usage into account.
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
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
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.
No description provided by the author
No description provided by the author
MaxCommandSize wraps "kv.raft.command.max_size".
MinLeaseTransferStatsDuration configures the minimum amount of time a replica must wait for stats about request counts to accumulate before making decisions based on them.
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
No description provided by the author
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
A CommandQueue maintains an interval tree of keys or key ranges for executing commands.
CommandQueueMetrics holds the metrics for a the command queue that are included in range metrics.
ConfChangeContext is encoded in the raftpb.ConfChange.Context field.
A ConsistencyCheckResult contains the outcome of a CollectChecksum call.
GCInfo contains statistics and insights from a GC run.
GCThreshold holds the key and txn span GC thresholds, respectively.
IncomingSnapshot contains the data for an incoming streaming snapshot message.
LeaseStatus holds the lease state, the timestamp at which the state is accurate, the lease and optionally the liveness if the lease is epoch-based.
Liveness holds information about a node's latest heartbeat and epoch.
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.
No description provided by the author
No description provided by the author
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.
ResolveOptions is used during intent resolution.
Server implements ConsistencyServer.
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.
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.

# Interfaces

No description provided by the author
No description provided by the author
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
No description provided by the author
No description provided by the author
OutgoingSnapshotStream is the minimal interface on a GRPC stream required to send a snapshot over the network.
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.
CommandQueueSnapshot is a map from command ids to commands.
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.
No description provided by the author
NodeAddressResolver is the function used by RaftTransport to map node IDs to network addresses.
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.
NodeLivenessStatus describes the status of a node from the perspective of the liveness system.
RangeLogEventReason specifies the reason why a range-log event happened.
No description provided by the author
ReplicaSnapshotDiffSlice groups multiple ReplicaSnapshotDiff records and exposes a formatting helper.
No description provided by the author
No description provided by the author