package
19.2.12+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
CleanupTempDirs removes all directories listed in the record file specified by recordPath.
ClearRangeWithHeuristic clears the keys from start (inclusive) to end (exclusive).
ComputeStatsGo scans the underlying engine from start to end keys and computes stats counters based on the values.
CreateTempDir creates a temporary directory with a prefix under the given parentDir and returns the absolute path of the temporary directory.
DecodeMVCCKey decodes an engine.MVCCKey from its serialized representation.
EncodeKey encodes an engine.MVCC key into the RocksDB representation.
EncodeKeyToBuf encodes an engine.MVCC key into the RocksDB representation.
GetBufUsingIter returns an IterAndBuf using the supplied iterator.
GetIterAndBuf returns an IterAndBuf for passing into various MVCC* methods.
IsIntentOf returns true if the meta record is an intent of the supplied transaction.
MakeGarbageCollector allocates and returns a new GC, with expiration computed based on current time and policy.TTLSeconds.
MakeMultiIterator creates an iterator that multiplexes SimpleIterators.
MakeMVCCMetadataKey creates an MVCCKey from a roachpb.Key.
MakeValue returns the inline value.
MergeInternalTimeSeriesData exports the engine's C++ merge logic for InternalTimeSeriesData to higher level packages.
MVCCBlindConditionalPut is a fast-path of MVCCConditionalPut.
MVCCBlindInitPut is a fast-path of MVCCInitPut.
MVCCBlindPut is a fast-path of MVCCPut.
MVCCBlindPutProto sets the given key to the protobuf-serialized byte string of msg and the provided timestamp.
MVCCClearTimeRange clears all MVCC versions within the span [key, endKey) which have timestamps in the span (startTime, endTime].
MVCCConditionalPut sets the value for a specified key only if the expected value matches.
MVCCDelete marks the key deleted so that it will not be returned in future get responses.
MVCCDeleteRange deletes the range of key/value pairs specified by start and end keys.
MVCCFindSplitKey finds a key from the given span such that the left side of the split is roughly targetSize bytes.
MVCCGarbageCollect creates an iterator on the engine.
MVCCGet returns the most recent value for the specified key whose timestamp is less than or equal to the supplied timestamp.
MVCCGetAsTxn constructs a temporary transaction from the given transaction metadata and calls MVCCGet as that transaction.
MVCCGetProto fetches the value at the specified key and unmarshals it into msg if msg is non-nil.
MVCCIncrement fetches the value for key, and assuming the value is an "integer" type, increments it by inc and stores the new value.
MVCCInitPut sets the value for a specified key if the key doesn't exist.
MVCCIterate iterates over the key range [start,end).
MVCCKeyCompare compares cockroach keys, including the MVCC timestamps.
MVCCMerge implements a merge operation.
MVCCPut sets the value for a specified key.
MVCCPutProto sets the given key to the protobuf-serialized byte string of msg and the provided timestamp.
MVCCResolveWriteIntent either commits or aborts (rolls back) an extant write intent for a given txn according to commit parameter.
MVCCResolveWriteIntentRange commits or aborts (rolls back) the range of write intents specified by start and end keys for a given txn.
MVCCResolveWriteIntentRangeUsingIter commits or aborts (rolls back) the range of write intents specified by start and end keys for a given txn.
MVCCResolveWriteIntentUsingIter is a variant of MVCCResolveWriteIntent that uses iterator and buffer passed as parameters (e.g.
MVCCScan scans the key range [key, endKey) in the provided engine up to some maximum number of results in ascending order.
MVCCScanToBytes is like MVCCScan, but it returns the results in a byte array.
NewInMem allocates and returns a new, opened InMem engine.
NewMemSSTIterator returns a SimpleIterator for a leveldb format sstable in memory.
NewOpLoggerBatch creates a new batch that logs logical mvcc operations and wraps the provided batch.
NewPebbleTempEngine creates a new engine for DistSQL processors to use when the working set is larger than can be stored in memory.
NewRocksDBBatchReader creates a RocksDBBatchReader from the given repr and verifies the header.
NewSSTIterator returns a SimpleIterator for a leveldb formatted sstable on disk.
NewTempEngine creates a new engine for DistSQL processors to use when the working set is larger than can be stored in memory.
PutProto sets the given key to the protobuf-serialized byte string of msg and the provided timestamp.
RecordTempDir records tempPath to the record file specified by recordPath to facilitate cleanup of the temporary directory on subsequent startups.
RocksDBBatchCount provides an efficient way to get the count of mutations in a RocksDB Batch representation.
Scan returns up to max key/value objects starting from start (inclusive) and ending at end (non-inclusive).
WriteSyncNoop carries out a synchronous no-op write to the engine.
# Constants
These constants come from rocksdb/db/dbformat.h.
These constants come from rocksdb/db/dbformat.h.
These constants come from rocksdb/db/dbformat.h.
BatchTypeColumnFamilySingleDeletion BatchType = 0x8 BatchTypeBeginPrepareXID BatchType = 0x9 BatchTypeEndPrepareXID BatchType = 0xA BatchTypeCommitXID BatchType = 0xB BatchTypeRollbackXID BatchType = 0xC BatchTypeNoop BatchType = 0xD BatchTypeColumnFamilyRangeDeletion BatchType = 0xE.
BatchTypeColumnFamilyDeletion BatchType = 0x4 BatchTypeColumnFamilyValue BatchType = 0x5 BatchTypeColumnFamilyMerge BatchType = 0x6.
These constants come from rocksdb/db/dbformat.h.
CPutAllowIfMissing is used to indicate a CPut can also succeed when the expected entry does not exist.
CPutFailIfMissing is used to indicate the existing value must match the expected value exactly i.e.
MaxArrayLen is a safe maximum length for slices on this architecture.
MVCCAbortIntentOpType corresponds to the MVCCAbortIntentOp variant.
MVCCCommitIntentOpType corresponds to the MVCCCommitIntentOp variant.
MVCCUpdateIntentOpType corresponds to the MVCCUpdateIntentOp variant.
MVCCVersionTimestampSize is the size of the timestamp portion of MVCC version keys (used to update stats).
MVCCWriteIntentOpType corresponds to the MVCCWriteIntentOp variant.
MVCCWriteValueOpType corresponds to the MVCCWriteValueOp variant.
# Variables
MVCCComparer is a pebble.Comparer object that implements MVCC-specific comparator settings for use with Pebble.
MVCCKeyMax is a maximum mvcc-encoded key value which sorts after all other keys.
NilKey is the nil MVCCKey.
# Structs
EncryptionRegistries contains the encryption-related registries: Both are serialized protobufs.
EnvStats is a set of RocksDB env stats, including encryption status.
GarbageCollector GCs MVCC key/values using a zone-specific GC policy allows either the union or intersection of maximum # of versions and maximum age.
InMem wraps RocksDB and configures it for in-memory only storage.
IterAndBuf used to pass iterators and buffers between MVCC* calls, allowing reuse without the callers needing to know the particulars.
IteratorStats is returned from (Iterator).Stats.
IterOptions contains options used to create an Iterator.
MVCCGetOptions bundles options for the MVCCGet family of functions.
MVCCKey is a versioned key, distinguished from roachpb.Key with the addition of a timestamp.
MVCCKeyValue contains the raw bytes of the value for a key.
MVCCLogicalOpDetails contains details about the occurrence of an MVCC logical operation.
MVCCScanOptions bundles options for the MVCCScan family of functions.
OpLoggerBatch records a log of logical MVCC operations.
RocksDBBatchBuilder is used to construct the RocksDB batch representation.
RocksDBBatchReader is used to iterate the entries in a RocksDB batch representation.
A RocksDBError wraps an error returned from a RocksDB operation.
Stats is a set of RocksDB stats.
Version stores all the version information for all stores and is used as the format for the version file.
# Interfaces
Batch is the interface for batch specific operations.
Engine is the interface that wraps the core operations of a key/value store.
Iterator is an interface for iterating over key/value pairs in an engine.
Reader is the read interface to an engine's data.
ReadWriter is the read/write interface to an engine's data.
SimpleIterator is an interface for iterating over key/value pairs in an engine.
WithSSTables extends the Engine interface with a method to get info on all SSTables in use.
Writer is the write interface to an engine's data.
# Type aliases
BatchType represents the type of an entry in an encoded RocksDB batch.
CPutMissingBehavior describes the handling a non-existing expected value.
MVCCLogicalOpType is an enum with values corresponding to each of the enginepb.MVCCLogicalOp variants.