Skip to main content

Module engine

Module engine 

Source
Expand description

RocksDB engine: database-wide operations and shared resources.

Engine owns the opened RocksDB instance together with the worker pool, the shared open-time context, and the flags fixed at open (read-only, secondary, checksums). Per-column-family reads and writes go through Map; the methods here act on the database as a whole: WAL flush and sync, memtable flush, manual compaction and primary catch-up, checkpoints, property queries, and the cork counter that coalesces WAL writes (see the cork module).

Re-exportsยง

use std::collections::BTreeMap; ๐Ÿ”’
use std::ffi::CStr; ๐Ÿ”’
use std::path::Path; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use std::sync::OnceLock; ๐Ÿ”’
use std::sync::Weak; ๐Ÿ”’
use std::sync::atomic::AtomicU32; ๐Ÿ”’
use std::sync::atomic::Ordering; ๐Ÿ”’
use rocksdb::AsColumnFamilyRef; ๐Ÿ”’
use rocksdb::BoundColumnFamily; ๐Ÿ”’
use rocksdb::DBCommon; ๐Ÿ”’
use rocksdb::DBWithThreadMode; ๐Ÿ”’
use rocksdb::FlushOptions; ๐Ÿ”’
use rocksdb::MultiThreaded; ๐Ÿ”’
use rocksdb::WaitForCompactOptions; ๐Ÿ”’
use rocksdb::WriteOptions; ๐Ÿ”’
use rocksdb::checkpoint::Checkpoint; ๐Ÿ”’
use tuwunel_core::Err; ๐Ÿ”’
use tuwunel_core::Result; ๐Ÿ”’
use tuwunel_core::debug; ๐Ÿ”’
use tuwunel_core::debug; ๐Ÿ”’
use tuwunel_core::err; ๐Ÿ”’
use tuwunel_core::implement; ๐Ÿ”’
use tuwunel_core::info; ๐Ÿ”’
use tuwunel_core::info; ๐Ÿ”’
use tuwunel_core::warn; ๐Ÿ”’
use crate::Context; ๐Ÿ”’
use crate::Map; ๐Ÿ”’
use crate::pool::Pool; ๐Ÿ”’
use crate::util::map_err; ๐Ÿ”’
use crate::util::result; ๐Ÿ”’

Modulesยง

backup ๐Ÿ”’
cf_opts ๐Ÿ”’
context ๐Ÿ”’
db_opts ๐Ÿ”’
descriptor ๐Ÿ”’
Database column descriptors
env ๐Ÿ”’
events ๐Ÿ”’
files ๐Ÿ”’
logger ๐Ÿ”’
memory_usage ๐Ÿ”’
open ๐Ÿ”’
repair ๐Ÿ”’

Structsยง

Engine
Handle to the opened RocksDB database and its shared resources.

Type Aliasesยง

CfIndex ๐Ÿ”’
Db ๐Ÿ”’
Backing RocksDB type: multi-threaded column-family access, no transactions.