pub struct RocksDBUnifiedEngine;Expand description
Factory for unified single-DB storage (4 CFs, one Arc<DB>).
Opens a single RocksDB instance with all four column families and returns
both a RocksDBStorageEngine and a RocksDBStateMachine sharing the same
underlying Arc<DB>. This halves resource usage compared to the dual-instance
setup: one 128 MB block cache, one set of background jobs, one file-descriptor
budget.
§Usage
ⓘ
use d_engine_server::storage::RocksDBUnifiedEngine;
let (storage, sm) = RocksDBUnifiedEngine::open("/data/raft")?;Implementations§
Source§impl RocksDBUnifiedEngine
impl RocksDBUnifiedEngine
Sourcepub fn open<P>(
path: P,
) -> Result<(RocksDBStorageEngine, RocksDBStateMachine), Error>
pub fn open<P>( path: P, ) -> Result<(RocksDBStorageEngine, RocksDBStateMachine), Error>
Opens (or creates) a unified RocksDB instance at path.
Returns (RocksDBStorageEngine, RocksDBStateMachine) sharing one Arc<DB>.
Auto Trait Implementations§
impl Freeze for RocksDBUnifiedEngine
impl RefUnwindSafe for RocksDBUnifiedEngine
impl Send for RocksDBUnifiedEngine
impl Sync for RocksDBUnifiedEngine
impl Unpin for RocksDBUnifiedEngine
impl UnsafeUnpin for RocksDBUnifiedEngine
impl UnwindSafe for RocksDBUnifiedEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request