# Functions
CorruptionErrorf formats according to a format specifier and returns the string as an error value that is marked as a corruption error.
DecodeInternalKey decodes an encoded internal key.
InternalCompare compares two internal keys using the specified comparison function.
MakeExclusiveSentinelKey constructs an internal key that is an exclusive sentinel key, used as the upper boundary for an sstable when a ranged key is the largest key in an sstable.
MakeFilename builds a filename from components.
MakeFilepath builds a filepath from components.
MakeInPlaceValue constructs an in-place value.
MakeInternalKey constructs an internal key from a specified user key, sequence number and kind.
MakeRangeDeleteSentinelKey constructs an internal key that is a range deletion sentinel key, used as the upper boundary for an sstable when a range deletion is the largest key in an sstable.
MakeSearchKey constructs an internal key that is appropriate for searching for a the specified user key.
MakeTrailer constructs an internal key trailer from the specified sequence number and kind.
MarkCorruptionError marks given error as a corruption error.
MustExist checks if err is an error indicating a file does not exist.
ParseFilename parses the components from a filename.
ParseInternalKey parses the string representation of an internal key.
ParseKind parses the string representation of an internal key kind.
ParsePrettyInternalKey parses the pretty string representation of an internal key.
SeqNumFromTrailer returns the sequence number component of a trailer.
SharedPrefixLen returns the largest i such that a[:i] equals b[:i].
TrailerKind returns the key kind of the key trailer.
Visible returns true if a key with the provided sequence number is visible at the specified snapshot sequence numbers.
# Constants
SSTable block defaults.
SSTable block defaults.
SSTable block defaults.
The FileType enumeration.
The FileType enumeration.
The FileType enumeration.
The FileType enumeration.
The FileType enumeration.
The FileType enumeration.
The FileType enumeration.
The FileType enumeration.
InternalKeyBoundaryRangeKey is the marker for a range key boundary.
These constants are part of the file format, and should not be changed.
InternalKeyKindDeleteSized keys behave identically to InternalKeyKindDelete keys, except that they hold an associated uint64 value indicating the (len(key)+len(value)) of the shadowed entry the tombstone is expected to delete.
InternalKeyKindIngestSST is used to distinguish a batch that corresponds to the WAL entry for ingested sstables that are added to the flushable queue.
A marker for an invalid key.
These constants are part of the file format, and should not be changed.
This maximum value isn't part of the file format.
These constants are part of the file format, and should not be changed.
InternalKeyKindColumnFamilySingleDelete InternalKeyKind = 8InternalKeyKindBeginPrepareXID InternalKeyKind = 9InternalKeyKindEndPrepareXID InternalKeyKind = 10InternalKeyKindCommitXID InternalKeyKind = 11InternalKeyKindRollbackXID InternalKeyKind = 12InternalKeyKindNoop InternalKeyKind = 13InternalKeyKindColumnFamilyRangeDelete InternalKeyKind = 14.
InternalKeyKindRangeKeyDelete removes all range keys within a key range.
These constants are part of the file format, and should not be changed.
InternalKeyKindRangeKeySet and InternalKeyKindRangeUnset represent keys that set and unset values associated with ranges of key space.
InternalKeyKindSeparator is a key used for separator / successor keys written to sstable block indexes.
These constants are part of the file format, and should not be changed.
InternalKeyKindSetWithDelete keys are SET keys that have met with a DELETE or SINGLEDEL key in a prior compaction.
InternalKeyKindSingleDelete (SINGLEDEL) is a performance optimization solely for compactions (to reduce write amp and space amp).
Internal to the sstable format.
These constants are part of the file format, and should not be changed.
InternalKeyRangeDeleteSentinel is the marker for a range delete sentinel key.
InternalKeySeqNumBatch is a bit that is set on batch sequence numbers which prevents those entries from being excluded from iteration.
InternalKeySeqNumMax is the largest valid sequence number.
InternalKeyZeroSeqnumMaxTrailer is the largest trailer with a zero sequence number.
InternalTrailerLen is the number of bytes used to encode InternalKey.Trailer.
MaxShortAttribute is the maximum value of the short attribute (3 bits).
SeekGEFlagsNone is the default value of SeekGEFlags, with all flags disabled.
SeekLTFlagsNone is the default value of SeekLTFlags, with all flags disabled.
SeqNumStart is the first sequence number assigned to a key.
SeqNumZero is the zero sequence number, set by compactions if they can guarantee there are no keys underneath an internal key.
The available filter types.
# Variables
DefaultComparer is the default implementation of the Comparer interface.
DefaultFormatter is the default implementation of user key formatting: non-ASCII data is formatted as escaped hexadecimal values.
DefaultLogger logs to the Go stdlib logs.
DefaultMerger is the default implementation of the Merger interface.
ErrCorruption is a marker to indicate that data in a file (WAL, MANIFEST, sstable) isn't in the expected format.
ErrNotFound means that a get or delete call did not find the requested key.
InvalidInternalKey is an invalid internal key for which Valid() will return false.
# Structs
AppendValueMerger concatenates merge operands in order from oldest to newest.
ArchiveCleaner archives file instead delete.
AttributeAndLen represents the pair of value length and the short attribute.
Comparer defines a total ordering over the space of []byte keys: a 'less than' relationship.
DeleteCleaner deletes file.
A DiskFileNum is just a FileNum belonging to a file which exists on disk.
GaugeSampleMetric is used to measure a gauge value (e.g.
InMemLogger implements Logger using an in-memory buffer (used for testing).
InternalIteratorStats contains miscellaneous stats produced by InternalIterators that are part of the InternalIterator tree.
InternalKey is a key used for the in-memory and on-disk partial DBs that make up a pebble DB.
LazyFetcher supports fetching a lazy value.
LazyValue represents a value that may not already have been extracted.
LoggerWithNoopTracer wraps a logger and does no tracing.
Merger defines an associative merge operation.
NoopLoggerAndTracer does no logging and tracing.
ThroughputMetric is used to measure the byte throughput of some component that performs work in a single-threaded manner.
# Interfaces
BlockPropertyFilter is used in an Iterator to filter sstables and blocks within the sstable.
Cleaner cleans obsolete files.
DeletableValueMerger is an extension to ValueMerger which allows indicating that the result of a merge operation is non-existent.
A Fataler fatals a process with a message when called.
FilterPolicy is an algorithm for probabilistically encoding a set of keys.
FilterWriter provides an interface for creating filter blocks.
InternalIterator iterates over a DB's key/value pairs in key order.
Logger defines an interface for writing log messages.
LoggerAndTracer defines an interface for logging and tracing.
NeedsFileContents is implemented by a cleaner that needs the contents of the files that it is being asked to clean.
ValueFetcher is an interface for fetching a value.
ValueMerger receives merge operands one by one.
# Type aliases
AbbreviatedKey returns a fixed length prefix of a user key such that AbbreviatedKey(a) < AbbreviatedKey(b) iff a < b and AbbreviatedKey(a) > AbbreviatedKey(b) iff a > b.
Compare returns -1, 0, or +1 depending on whether a is 'less than', 'equal to' or 'greater than' b.
Equal returns true if a and b are equivalent.
FileNum is an internal DB identifier for a file.
FileType enumerates the types of files found in a DB.
FilterType is the level at which to apply a filter: block or table.
FormatBytes formats a byte slice using hexadecimal escapes for non-ASCII data.
FormatKey returns a formatter for the user key.
FormatValue returns a formatter for the user value.
ImmediateSuccessor is invoked with a prefix key ([Split(a) == len(a)]) and returns the smallest key that is larger than the given prefix a.
InternalKeyKind enumerates the kind of key: a deletion tombstone, a set value, a merged value, etc.
Merge creates a ValueMerger for the specified key initialized with the value of one merge operand.
SeekGEFlags holds flags that may configure the behavior of a forward seek.
SeekLTFlags holds flags that may configure the behavior of a reverse seek.
Separator is used to construct SSTable index blocks.
ShortAttribute encodes a user-specified attribute of the value.
ShortAttributeExtractor is an extractor that given the value, will return the ShortAttribute.
Split returns the length of the prefix of the user key that corresponds to the key portion of an MVCC encoding scheme to enable the use of prefix bloom filters.
Successor returns a shortened key given a key a, such that Compare(k, a) >= 0.