Versions in this module Expand all Collapse all v1 v1.1.4 Jan 1, 2018 Changes in this version + const BatchTypeDeletion + const BatchTypeMerge + const BatchTypeValue + const MinimumMaxOpenFiles + const RecommendedMaxOpenFiles + var MVCCKeyMax = MakeMVCCMetadataKey(roachpb.KeyMax) + var NilKey = MVCCKey + func AccountForSelf(ms *enginepb.MVCCStats, rangeID roachpb.RangeID) error + func ComputeStatsGo(iter SimpleIterator, start, end MVCCKey, nowNanos int64) (enginepb.MVCCStats, error) + func EncodeKey(key MVCCKey) []byte + func IsIntentOf(meta enginepb.MVCCMetadata, txn *roachpb.Transaction) bool + func IsValidSplitKey(key roachpb.Key) bool + func MVCCBlindConditionalPut(ctx context.Context, engine Writer, ms *enginepb.MVCCStats, key roachpb.Key, ...) error + func MVCCBlindInitPut(ctx context.Context, engine ReadWriter, ms *enginepb.MVCCStats, ...) error + func MVCCBlindPut(ctx context.Context, engine Writer, ms *enginepb.MVCCStats, key roachpb.Key, ...) error + func MVCCConditionalPut(ctx context.Context, engine ReadWriter, ms *enginepb.MVCCStats, ...) error + func MVCCDelete(ctx context.Context, engine ReadWriter, ms *enginepb.MVCCStats, ...) error + func MVCCDeleteRange(ctx context.Context, engine ReadWriter, ms *enginepb.MVCCStats, ...) ([]roachpb.Key, *roachpb.Span, int64, error) + func MVCCFindSplitKey(ctx context.Context, engine Reader, rangeID roachpb.RangeID, ...) (roachpb.Key, error) + func MVCCGarbageCollect(ctx context.Context, engine ReadWriter, ms *enginepb.MVCCStats, ...) error + func MVCCGet(ctx context.Context, engine Reader, key roachpb.Key, timestamp hlc.Timestamp, ...) (*roachpb.Value, []roachpb.Intent, error) + func MVCCGetAsTxn(ctx context.Context, engine Reader, key roachpb.Key, timestamp hlc.Timestamp, ...) (*roachpb.Value, []roachpb.Intent, error) + func MVCCGetProto(ctx context.Context, engine Reader, key roachpb.Key, timestamp hlc.Timestamp, ...) (bool, error) + func MVCCGetRangeStats(ctx context.Context, engine Reader, rangeID roachpb.RangeID) (enginepb.MVCCStats, error) + func MVCCIncrement(ctx context.Context, engine ReadWriter, ms *enginepb.MVCCStats, ...) (int64, error) + func MVCCInitPut(ctx context.Context, engine ReadWriter, ms *enginepb.MVCCStats, ...) error + func MVCCIterate(ctx context.Context, engine Reader, startKey, endKey roachpb.Key, ...) ([]roachpb.Intent, error) + func MVCCMerge(ctx context.Context, engine ReadWriter, ms *enginepb.MVCCStats, ...) error + func MVCCPut(ctx context.Context, engine ReadWriter, ms *enginepb.MVCCStats, ...) error + func MVCCPutProto(ctx context.Context, engine ReadWriter, ms *enginepb.MVCCStats, ...) error + func MVCCResolveWriteIntent(ctx context.Context, engine ReadWriter, ms *enginepb.MVCCStats, ...) error + func MVCCResolveWriteIntentRange(ctx context.Context, engine ReadWriter, ms *enginepb.MVCCStats, ...) (int64, error) + func MVCCResolveWriteIntentRangeUsingIter(ctx context.Context, engine ReadWriter, iterAndBuf IterAndBuf, ...) (int64, error) + func MVCCResolveWriteIntentUsingIter(ctx context.Context, engine ReadWriter, iterAndBuf IterAndBuf, ...) error + func MVCCReverseScan(ctx context.Context, engine Reader, key, endKey roachpb.Key, max int64, ...) ([]roachpb.KeyValue, *roachpb.Span, []roachpb.Intent, error) + func MVCCScan(ctx context.Context, engine Reader, key, endKey roachpb.Key, max int64, ...) ([]roachpb.KeyValue, *roachpb.Span, []roachpb.Intent, error) + func MVCCSetRangeStats(ctx context.Context, engine ReadWriter, rangeID roachpb.RangeID, ...) error + func MakeValue(meta enginepb.MVCCMetadata) roachpb.Value + func MergeInternalTimeSeriesData(sources ...roachpb.InternalTimeSeriesData) (roachpb.InternalTimeSeriesData, error) + func PutProto(engine Writer, key MVCCKey, msg proto.Message) (keyBytes, valBytes int64, err error) + func RocksDBBatchCount(repr []byte) (int, error) + func RunLDB(args []string) + func SplitMVCCKey(mvccKey []byte) (key []byte, ts []byte, ok bool) + type Batch interface + Commit func(sync bool) error + Distinct func() ReadWriter + Repr func() []byte + type BatchType byte + type Engine interface + Attrs func() roachpb.Attributes + Capacity func() (roachpb.StoreCapacity, error) + Flush func() error + GetAuxiliaryDir func() string + GetStats func() (*Stats, error) + IngestExternalFile func(ctx context.Context, path string, move bool) error + NewBatch func() Batch + NewReadOnly func() ReadWriter + NewSnapshot func() Reader + NewWriteOnlyBatch func() Batch + func NewTempEngine(ctx context.Context, storeCfg base.StoreSpec) (Engine, error) + type GarbageCollector struct + Threshold hlc.Timestamp + func MakeGarbageCollector(now hlc.Timestamp, policy config.GCPolicy) GarbageCollector + func (gc GarbageCollector) Filter(keys []MVCCKey, values [][]byte) hlc.Timestamp + type InMem struct + func NewInMem(attrs roachpb.Attributes, cacheSize int64) InMem + type IterAndBuf struct + func GetIterAndBuf(engine Reader) IterAndBuf + func (b IterAndBuf) Cleanup() + type Iterator interface + ComputeStats func(start, end MVCCKey, nowNanos int64) (enginepb.MVCCStats, error) + Key func() MVCCKey + Less func(key MVCCKey) bool + Prev func() + PrevKey func() + SeekReverse func(key MVCCKey) + Value func() []byte + ValueProto func(msg proto.Message) error + type MVCCKey struct + Key roachpb.Key + Timestamp hlc.Timestamp + func AllocIterKeyValue(a bufalloc.ByteAllocator, iter Iterator) (bufalloc.ByteAllocator, MVCCKey, []byte) + func DecodeKey(encodedKey []byte) (MVCCKey, error) + func MakeMVCCMetadataKey(key roachpb.Key) MVCCKey + func (k MVCCKey) EncodedSize() int + func (k MVCCKey) Equal(l MVCCKey) bool + func (k MVCCKey) IsValue() bool + func (k MVCCKey) Less(l MVCCKey) bool + func (k MVCCKey) Next() MVCCKey + func (k MVCCKey) String() string + type MVCCKeyValue struct + Key MVCCKey + Value []byte + func Scan(engine Reader, start, end MVCCKey, max int64) ([]MVCCKeyValue, error) + type ReadWriter interface + type Reader interface + Close func() + Closed func() bool + Get func(key MVCCKey) ([]byte, error) + GetProto func(key MVCCKey, msg proto.Message) (ok bool, keyBytes, valBytes int64, err error) + Iterate func(start, end MVCCKey, f func(MVCCKeyValue) (bool, error)) error + NewIterator func(prefix bool) Iterator + NewTimeBoundIterator func(start, end hlc.Timestamp) Iterator + type RocksDB struct + func NewRocksDB(cfg RocksDBConfig, cache RocksDBCache) (*RocksDB, error) + func (r *RocksDB) ApplyBatchRepr(repr []byte, sync bool) error + func (r *RocksDB) Attrs() roachpb.Attributes + func (r *RocksDB) Capacity() (roachpb.StoreCapacity, error) + func (r *RocksDB) Clear(key MVCCKey) error + func (r *RocksDB) ClearIterRange(iter Iterator, start, end MVCCKey) error + func (r *RocksDB) ClearRange(start, end MVCCKey) error + func (r *RocksDB) Close() + func (r *RocksDB) Closed() bool + func (r *RocksDB) Compact() error + func (r *RocksDB) Destroy() error + func (r *RocksDB) Flush() error + func (r *RocksDB) Get(key MVCCKey) ([]byte, error) + func (r *RocksDB) GetAuxiliaryDir() string + func (r *RocksDB) GetCompactionStats() string + func (r *RocksDB) GetProto(key MVCCKey, msg proto.Message) (ok bool, keyBytes, valBytes int64, err error) + func (r *RocksDB) GetSSTables() SSTableInfos + func (r *RocksDB) GetStats() (*Stats, error) + func (r *RocksDB) IngestExternalFile(ctx context.Context, path string, move bool) error + func (r *RocksDB) Iterate(start, end MVCCKey, f func(MVCCKeyValue) (bool, error)) error + func (r *RocksDB) Merge(key MVCCKey, value []byte) error + func (r *RocksDB) NewBatch() Batch + func (r *RocksDB) NewIterator(prefix bool) Iterator + func (r *RocksDB) NewReadOnly() ReadWriter + func (r *RocksDB) NewSnapshot() Reader + func (r *RocksDB) NewTimeBoundIterator(start, end hlc.Timestamp) Iterator + func (r *RocksDB) NewWriteOnlyBatch() Batch + func (r *RocksDB) Put(key MVCCKey, value []byte) error + func (r *RocksDB) String() string + func (r *RocksDB) WriteFile(filename string, data []byte) error + type RocksDBBatchBuilder struct + func (b *RocksDBBatchBuilder) ApplyRepr(repr []byte) error + func (b *RocksDBBatchBuilder) Clear(key MVCCKey) + func (b *RocksDBBatchBuilder) Finish() []byte + func (b *RocksDBBatchBuilder) Len() int + func (b *RocksDBBatchBuilder) Merge(key MVCCKey, value []byte) + func (b *RocksDBBatchBuilder) Put(key MVCCKey, value []byte) + type RocksDBBatchReader struct + func NewRocksDBBatchReader(repr []byte) (*RocksDBBatchReader, error) + func (r *RocksDBBatchReader) BatchType() BatchType + func (r *RocksDBBatchReader) Count() int + func (r *RocksDBBatchReader) Error() error + func (r *RocksDBBatchReader) Next() bool + func (r *RocksDBBatchReader) UnsafeKey() []byte + func (r *RocksDBBatchReader) UnsafeValue() []byte + type RocksDBCache struct + func NewRocksDBCache(cacheSize int64) RocksDBCache + func (c RocksDBCache) Release() + type RocksDBConfig struct + Attrs roachpb.Attributes + Dir string + MaxOpenFiles uint64 + MaxSizeBytes int64 + MustExist bool + Settings *cluster.Settings + WarnLargeBatchThreshold time.Duration + type RocksDBError struct + func (err *RocksDBError) Error() string + func (err *RocksDBError) SafeMessage() string + type RocksDBMap struct + func NewRocksDBMap(e Engine) *RocksDBMap + func NewRocksDBMultiMap(e Engine) *RocksDBMap + func (r *RocksDBMap) Close(ctx context.Context) + func (r *RocksDBMap) Get(k []byte) ([]byte, error) + func (r *RocksDBMap) NewBatchWriter() SortedDiskMapBatchWriter + func (r *RocksDBMap) NewBatchWriterCapacity(capacityBytes int) SortedDiskMapBatchWriter + func (r *RocksDBMap) NewIterator() SortedDiskMapIterator + func (r *RocksDBMap) Put(k []byte, v []byte) error + type RocksDBMapBatchWriter struct + func (b *RocksDBMapBatchWriter) Close(ctx context.Context) error + func (b *RocksDBMapBatchWriter) Flush() error + func (b *RocksDBMapBatchWriter) Put(k []byte, v []byte) error + type RocksDBMapIterator struct + func (i *RocksDBMapIterator) Close() + func (i *RocksDBMapIterator) Key() []byte + func (i *RocksDBMapIterator) Next() + func (i *RocksDBMapIterator) Rewind() + func (i *RocksDBMapIterator) Seek(k []byte) + func (i *RocksDBMapIterator) UnsafeKey() []byte + func (i *RocksDBMapIterator) UnsafeValue() []byte + func (i *RocksDBMapIterator) Valid() (bool, error) + func (i *RocksDBMapIterator) Value() []byte + type RocksDBSstFileReader struct + func MakeRocksDBSstFileReader() RocksDBSstFileReader + func (fr *RocksDBSstFileReader) Close() + func (fr *RocksDBSstFileReader) IngestExternalFile(data []byte) error + func (fr *RocksDBSstFileReader) Iterate(start, end MVCCKey, f func(MVCCKeyValue) (bool, error)) error + func (fr *RocksDBSstFileReader) NewIterator(prefix bool) Iterator + type RocksDBSstFileWriter struct + DataSize int64 + func MakeRocksDBSstFileWriter() (RocksDBSstFileWriter, error) + func (fw *RocksDBSstFileWriter) Add(kv MVCCKeyValue) error + func (fw *RocksDBSstFileWriter) Close() + func (fw *RocksDBSstFileWriter) Finish() ([]byte, error) + type SSTableInfo struct + End MVCCKey + Level int + Size int64 + Start MVCCKey + type SSTableInfos []SSTableInfo + func (s SSTableInfos) Len() int + func (s SSTableInfos) Less(i, j int) bool + func (s SSTableInfos) ReadAmplification() int + func (s SSTableInfos) String() string + func (s SSTableInfos) Swap(i, j int) + type SimpleIterator interface + Close func() + Next func() + NextKey func() + Seek func(key MVCCKey) + UnsafeKey func() MVCCKey + UnsafeValue func() []byte + Valid func() (bool, error) + type SortedDiskMap interface + Close func(context.Context) + Get func(k []byte) ([]byte, error) + NewBatchWriter func() SortedDiskMapBatchWriter + NewBatchWriterCapacity func(capacityBytes int) SortedDiskMapBatchWriter + NewIterator func() SortedDiskMapIterator + Put func(k []byte, v []byte) error + type SortedDiskMapBatchWriter interface + Close func(context.Context) error + Flush func() error + Put func(k []byte, v []byte) error + type SortedDiskMapIterator interface + Close func() + Key func() []byte + Next func() + Rewind func() + Seek func(key []byte) + UnsafeKey func() []byte + UnsafeValue func() []byte + Valid func() (bool, error) + Value func() []byte + type Stats struct + BlockCacheHits int64 + BlockCacheMisses int64 + BlockCachePinnedUsage int64 + BlockCacheUsage int64 + BloomFilterPrefixChecked int64 + BloomFilterPrefixUseful int64 + Compactions int64 + Flushes int64 + MemtableHits int64 + MemtableMisses int64 + MemtableTotalSize int64 + TableReadersMemEstimate int64 + type Version struct + Version storageVersion + type Writer interface + ApplyBatchRepr func(repr []byte, sync bool) error + Clear func(key MVCCKey) error + ClearIterRange func(iter Iterator, start, end MVCCKey) error + ClearRange func(start, end MVCCKey) error + Merge func(key MVCCKey, value []byte) error + Put func(key MVCCKey, value []byte) error