package
19.2.12+incompatible
Repository: https://github.com/andreimatei/cockroach.git
Documentation: pkg.go.dev
# Functions
AbortSpanKey returns a range-local key by Range ID for an AbortSpan entry, with detail specified by encoding the supplied transaction ID.
Addr returns the address for the key, used to lookup the range containing the key.
AddrUpperBound returns the address of an (exclusive) EndKey, used to lookup ranges containing the keys strictly smaller than that key.
DecodeAbortSpanKey decodes the provided AbortSpan entry, returning the transaction ID.
DecodeDescMetadataID decodes a descriptor ID from a descriptor metadata key.
DecodeRangeIDKey parses a local range ID key into range ID, infix, suffix, and detail.
DecodeRangeKey decodes the range key into range start key, suffix and optional detail (may be nil).
DecodeStoreKey returns the suffix and detail portions of a local store key.
DecodeStoreSuggestedCompactionKey returns the start and end keys of the suggested compaction's span.
DecodeTablePrefix validates that the given key has a table prefix, returning the remainder of the key (with the prefix removed) and the decoded descriptor ID of the table.
EnsureSafeSplitKey transforms an SQL table key such that it is a valid split key (i.e.
GetRowPrefixLength returns the length of the row prefix of the key.
IsDescriptorKey returns true if the passed Key is a valid Descriptor key.
IsLocal performs a cheap check that returns true iff a range-local key is passed, that is, a key for which `Addr` would return a non-identical RKey (or a decoding error).
LeaseAppliedIndexLegacyKey returns a system-local key for a lease applied index.
MakeFamilyKey returns the key for the family in the given row by appending to the passed key.
MakeRangeIDPrefix creates a range-local key prefix from rangeID for both replicated and unreplicated data.
MakeRangeIDPrefixBuf creates a new range ID prefix buf suitable for generating the various range ID local keys.
MakeRangeIDReplicatedPrefix creates a range-local key prefix from rangeID for all Raft replicated data.
MakeRangeIDUnreplicatedPrefix creates a range-local key prefix from rangeID for all unreplicated data.
MakeRangeKey creates a range-local key based on the range start key, metadata key suffix, and optional detail (e.g.
MakeRangeKeyPrefix creates a key prefix under which all range-local keys can be found.
MakeSequenceKey returns the key used to store the value of a sequence.
MakeStoreKey creates a store-local key based on the metadata key suffix, and optional detail.
MakeTablePrefix returns the key prefix used for the table's data.
MassagePrettyPrintedSpanForTest does some transformations on pretty-printed spans and keys: - if dirs is not nil, replace all ints with their ones' complement for descendingly-encoded columns.
MetaReverseScanBounds returns the range [start,end) within which the desired meta record can be found by means of a reverse engine scan.
MetaScanBounds returns the range [start,end) within which the desired meta record can be found by means of an engine scan.
MustAddr calls Addr and panics on errors.
NewInvalidRangeMetaKeyError returns a new InvalidRangeMetaKeyError.
NodeLivenessKey returns the key for the node liveness record.
NodeStatusKey returns the key for accessing the node status for the specified node ID.
PrettyPrint prints the key in a human readable format, see TestPrettyPrint.
PrettyPrintRange pretty prints a compact representation of a key range.
QueueLastProcessedKey returns a range-local key for last processed timestamps for the named queue.
RaftAppliedIndexLegacyKey returns a system-local key for a raft applied index.
RaftHardStateKey returns a system-local key for a Raft HardState.
RaftLastIndexKey returns a system-local key for the last index of the Raft log.
RaftLogKey returns a system-local key for a Raft log entry.
RaftLogPrefix returns the system-local prefix shared by all Entries in a Raft log.
RaftTombstoneIncorrectLegacyKey returns a system-local key for a raft tombstone.
RaftTombstoneKey returns a system-local key for a raft tombstone.
RaftTruncatedStateKey returns a system-local key for a RaftTruncatedState.
RaftTruncatedStateLegacyKey returns a system-local key for a RaftTruncatedState.
Range returns a key range encompassing the key ranges of all requests.
RangeAppliedStateKey returns a system-local key for the range applied state key.
RangeDescriptorJointKey returns a range-local key for the "joint descriptor" for the range with specified key.
RangeDescriptorKey returns a range-local key for the descriptor for the range with specified key.
RangeFrozenStatusKey returns a system-local key for the frozen status.
RangeLastGCKey returns a system-local key for last used GC threshold on the user keyspace.
RangeLastReplicaGCTimestampKey returns a range-local key for the range's last replica GC timestamp.
RangeLastVerificationTimestampKeyDeprecated returns a range-local key for the range's last verification timestamp.
RangeLeaseKey returns a system-local key for a range lease.
RangeMetaKey returns a range metadata (meta1, meta2) indexing key for the given key.
RangeStatsLegacyKey returns the key for accessing the MVCCStats struct for the specified Range ID.
RangeTxnSpanGCThresholdKey returns a system-local key for last used GC threshold on the txn span.
StoreClusterVersionKey returns a store-local key for the cluster version.
StoreGossipKey returns a store-local key for the gossip bootstrap metadata.
StoreHLCUpperBoundKey returns the store-local key for storing an upper bound to the wall time used by HLC.
StoreIdentKey returns a store-local key for the store metadata.
StoreLastUpKey returns the key for the store's "last up" timestamp.
StoreSuggestedCompactionKey returns a store-local key for a suggested compaction.
TransactionKey returns a transaction key based on the provided transaction key and ID.
UserKey returns an ordinary key for the given range metadata (meta1, meta2) indexing key.
# Constants
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
CommentType is type for system.comments.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Reserved IDs for other system tables.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
MaxReservedDescID is the maximum value of reserved descriptor IDs.
MaxSystemConfigDescID is the maximum system descriptor ID that will be gossiped as part of the SystemConfig.
Various IDs used by the structured data layer.
MinNonPredefinedUserDescID is the first descriptor ID used by user-level objects that are not created automatically on empty clusters (default databases).
MinUserDescID is the first descriptor ID available for user structured data.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
RootNamespaceID is the ID of the root namespace.
SequenceColumnFamilyID is the ID of the column family on each special single-column, single-row sequence table.
SequenceIndexID is the ID of the single index on each special single-column, single-row sequence table.
Various IDs used by the structured data layer.
SystemDatabaseID and following are the database/table IDs for objects in the system span.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
Various IDs used by the structured data layer.
IDs for the important columns and indexes in the zones table live here to avoid introducing a dependency on sql/sqlbase throughout the codebase.
# Variables
BootstrapVersion is the key at which clusters bootstrapped with a version > 1.0 persist the version at which they were bootstrapped.
ConstKeyDict translates some pretty-printed keys.
DescIDGenerator is the global descriptor ID generator sequence used for table and namespace IDs.
KeyDict drives the pretty-printing and pretty-scanning of the key space.
LocalAbortSpanSuffix is the suffix for AbortSpan entries.
LocalLeaseAppliedIndexLegacySuffix is the suffix for the applied lease index.
LocalMax is the end of the local key range.
LocalQueueLastProcessedSuffix is the suffix for replica queue state keys.
LocalRaftAppliedIndexLegacySuffix is the suffix for the raft applied index.
LocalRaftHardStateSuffix is the Suffix for the raft HardState.
LocalRaftLastIndexSuffix is the suffix for raft's last index.
LocalRaftLogSuffix is the suffix for the raft log.
LocalRaftTombstoneSuffix is the suffix for the raft tombstone.
LocalRaftTruncatedStateLegacySuffix is the suffix for the legacy RaftTruncatedState.
LocalRangeAppliedStateSuffix is the suffix for the range applied state key.
LocalRangeDescriptorJointSuffix is the suffix for keys storing range descriptors.
LocalRangeDescriptorSuffix is the suffix for keys storing range descriptors.
LocalRangeFrozenStatusSuffix is the suffix for a frozen status.
LocalRangeIDPrefix is the prefix identifying per-range data indexed by Range ID.
LocalRangeIDReplicatedInfix is the post-Range ID specifier for all Raft replicated per-range data.
LocalRangeLastGCSuffix is the suffix for the last GC.
LocalRangeLastReplicaGCTimestampSuffix is the suffix for a range's last replica GC timestamp (for GC of old replicas).
LocalRangeLastVerificationTimestampSuffixDeprecated is the suffix for a range's last verification timestamp (for checking integrity of on-disk data).
LocalRangeLeaseSuffix is the suffix for a range lease.
Constants for system-reserved keys in the KV map.
LocalRangePrefix is the prefix identifying per-range data indexed by range key (either start key, or some key in the range).
LocalRangeStatsLegacySuffix is the suffix for range statistics.
LocalStoreSuggestedCompactionsMax is the end of the span of possible suggested compaction keys for a store.
LocalStoreSuggestedCompactionsMin is the start of the span of possible suggested compaction keys for a store.
LocalTransactionSuffix specifies the key suffix for transaction records.
LocalTxnSpanGCThresholdSuffix is the suffix for the last txn span GC's threshold.
MaxKey is the infinity marker which is larger than any other key.
Meta1KeyMax is the end of the range of the first level of key addressing.
Meta1Prefix is the first level of key addressing.
Meta1Span holds all first level addressing records.
Meta2KeyMax is the end of the range of the second level of key addressing.
Meta2MaxSpan begins at key Meta2KeyMax with the last entry in the second level addressing keyspace.
Meta2Prefix is the second level of key addressing.
MetaMax is the end of the range of addressing keys.
MetaMin is the start of the range of addressing keys.
MigrationKeyMax is the maximum value for any system migration key.
MigrationLease is the key that nodes must take a lease on in order to run system migrations on the cluster.
MigrationPrefix specifies the key prefix to store all migration details.
MinKey is a minimum key value which sorts before all other keys.
NodeIDGenerator is the global node ID generator sequence.
NodeLivenessKeyMax is the maximum value for any node liveness key.
NodeLivenessPrefix specifies the key prefix for the node liveness table.
NodeLivenessSpan holds the liveness records for nodes in the cluster.
NoSplitSpans describes the ranges that should never be split.
PrettyPrintTimeseriesKey is a hook for pretty printing a timeseries key.
PseudoTableIDs is the list of ids from above that are not real tables (i.e.
RangeIDGenerator is the global range ID generator sequence.
StatusNodePrefix stores all status info for nodes.
StatusPrefix specifies the key prefix to store all status details.
StoreIDGenerator is the global store ID generator sequence.
SystemConfigSpan is the range of system objects which will be gossiped.
SystemConfigSplitKey is the key to split at immediately prior to the system config span.
SystemConfigTableDataMax is the end key of system config span.
Constants for system-reserved keys in the KV map.
SystemPrefix indicates the beginning of the key range for global, system data which are replicated across the cluster.
TableDataMin is the end of the range of table data keys.
TableDataMin is the start of the range of table data keys.
TimeseriesKeyMax is the maximum value for any timeseries data.
TimeseriesPrefix is the key prefix for all timeseries data.
UserTableDataMin is the start key of user structured data.
# Structs
DictEntry contains info on pretty-printing and pretty-scanning keys in a region of the key space.
ErrUglifyUnsupported is returned when UglyPrint doesn't know how to process a key.
InvalidRangeMetaKeyError indicates that a Range Metadata key is somehow invalid.
# Type aliases
KeyComprehensionTable contains information about how to decode pretty-printed keys, split by key spans.
KeyParserFunc is a function able to reverse pretty-printed keys.
RangeIDPrefixBuf provides methods for generating range ID local keys while avoiding an allocation on every key generated.