Crate engine_rocks[][src]

Implementation of engine_traits for RocksDB

This is a work-in-progress attempt to abstract all the features needed by TiKV to persist its data.

The module structure here mirrors that in engine_traits where possible.

Because there are so many similarly named types across the TiKV codebase, and so much “import renaming”, this crate consistently explicitly names type that implement a trait as RocksTraitname, to avoid the need for import renaming and make it obvious what type any particular module is working with.

Please read the engine_trait crate docs before hacking.

Re-exports

pub use crate::range_properties::*;
pub use crate::mvcc_properties::*;
pub use crate::perf_context::*;
pub use properties::*;
pub use rocks_metrics::*;
pub use rocks_metrics_defs::*;
pub use event_listener::*;
pub use config::*;
pub use ttl_properties::*;

Modules

cf_names
cf_options
compact
compact_listener
compat
config
db_options
db_vector
encryption
engine
engine_iterator
event_listener
file_system
import
logger
misc
mvcc_properties
options
perf_context
perf_context_impl
perf_context_metrics
properties
raft_engine
range_properties
raw

Reexports from the rocksdb crate

raw_util

Functions for constructing the rocksdb crate’s DB type

rocks_metrics
rocks_metrics_defs
snapshot
sst
sst_partitioner
table_properties
ttl_properties
util
write_batch

Macros

observe_perf_context_type
report_perf_context

Structs

CompactionListener
PerfContext
RaftDBLogger
RocksColumnFamilyOptions
RocksCompactedEvent
RocksCompactionJobInfo
RocksDBOptions
RocksDBVector
RocksEngine
RocksEngineIterator
RocksExternalSstFileInfo
RocksIngestExternalFileOptions
RocksSeekKey
RocksSnapshot
RocksSstIterator
RocksSstPartitioner
RocksSstPartitionerFactory
RocksSstReader
RocksSstWriter
RocksSstWriterBuilder
RocksTableProperties
RocksTablePropertiesCollection
RocksTablePropertiesCollectionIter
RocksTablePropertiesKey
RocksTitanDBOptions
RocksUserCollectedProperties
RocksUserCollectedPropertiesNoRc
RocksWriteBatch
RocksWriteBatchVec

RocksWriteBatchVec is for method multi_batch_write of RocksDB, which splits a large WriteBatch into many smaller ones and then any thread could help to deal with these small WriteBatch when it is calling AwaitState and wait to become leader of WriteGroup. multi_batch_write will perform much better than traditional pipelined_write when TiKV writes very large data into RocksDB. We will remove this feature when unordered_write of RocksDB becomes more stable and becomes compatible with Titan.

RocksdbLogger

Constants

MAX_DELETE_COUNT_BY_KEY

Traits

Compat

A trait to enter the world of engine traits from a raw Arc<DB> with as little syntax as possible.

Functions

set_perf_level

Type Definitions

Filter