package
0.0.0-20160920194302-ad86efcaa21b
Repository: https://github.com/a10y/cockroach.git
Documentation: pkg.go.dev

# Packages

Package engine provides low-level storage.
No description provided by the author
Package storagebase is a generated protocol buffer package.

# Functions

ComputeStatsForRange computes the stats for a given range by iterating over all key ranges for the given range that should be accounted for in its stats.
DecodeRaftCommand splits a raftpb.Entry.Data into its commandID and command portions.
GossipAddressResolver is a thin wrapper around gossip's GetNodeIDAddress that allows its return value to be used as the net.Addr interface.
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.
NewAbortCache returns a new abort cache.
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
NewRaftTransport creates a new RaftTransport with specified resolver and grpc server.
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.
NewReplicaDataIterator creates a ReplicaDataIterator for the given replica.
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.
No description provided by the author
No description provided by the author
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).
TestStoreContext has some fields initialized with values relevant in tests.
TrackRaftProtos instruments proto marshalling to track protos which are marshalled downstream of raft.

# 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.
ErrMsgConflictUpdatingRangeDesc is an error message that is returned by AdminSplit when it conflicts with some other process that updates range descriptors.
MinTSCacheWindow specifies the minimum duration to hold entries in the cache before allowing eviction.
RaftLogQueueStaleThreshold is the minimum threshold for stale raft log entries.
RaftLogQueueTimerDuration is the duration between truncations.
RangeEventLogAdd is the event type recorded when a range adds a new replica.
RangeEventLogRemove is the event type recorded when a range removes a replica.
RangeEventLogSplit is the event type recorded when a range splits.
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.
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.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RebalanceThreshold is the minimum ratio of a store's range surplus to the mean range count that permits rebalances away from that store.

# Structs

The AbortCache sets markers for aborted transactions to provide protection against an aborted but active transaction not reading values it wrote (due to its intents having been removed).
Allocator tries to spread replicas as evenly as possible across the stores in the cluster.
AllocatorOptions are configurable options which effect the way that the replicate queue will handle rebalancing opportunities.
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.
ConfChangeContext is encoded in the raftpb.ConfChange.Context field.
GCInfo contains statistics and insights from a GC run.
A NotBootstrappedError indicates that an engine has not yet been bootstrapped due to a store identifier not being present.
A PollFrozenRequest asks the addressed Store for its frozen or thawed Replicas.
A PollFrozenResponse is the response returned from a PollFrozenRequest.
PostCommitTrigger is returned from Raft processing as a side effect which signals that further action should be taken as part of the processing of the Raft command.
RaftMessageRequest is the request used to send raft messages using our protobuf-based RPC codec.
RaftMessageResponse may be sent to the sender of a RaftMessageRequest.
No description provided by the author
RaftSnapshotStatus contains a MsgSnap message and its resulting error, for asynchronous notification of completion.
RaftTransport handles the rpc messages for raft.
A Replica is a contiguous keyspace with writes managed via an instance of the Raft consensus algorithm.
ReplicaDataIterator provides a complete iteration over all key / value rows in a range, including all system-local metadata and user data.
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.
A ReservationRequest asks the addressed Store to reserve the space for a new replica for the Range of RangeID reserving RangeSize bytes.
A ReservationResponse is the response returned from a ReservationRequest.
Server implements the storage parts of the StoresServer interface.
A Store maintains a map of ranges by start key.
A StoreContext encompasses the auxiliary objects and configuration required to create a store.
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.
A 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
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
RaftMessageHandler is the interface that must be implemented by arguments to RaftTransport.Listen.
RaftMessageResponseStream is a subset of the MultiRaft_RaftMessageServer interface that is needed for sending responses.
No description provided by the author
No description provided by the author

# Type aliases

AllocatorAction enumerates the various replication adjustments that may be recommended by the allocator.
NodeAddressResolver is the function used by RaftTransport to map node IDs to network addresses.
RangeEventLogType describes a specific event type recorded in the range log table.