rename db to engine
This commit is contained in:
parent
e0169e3dca
commit
b882e7efdb
25 changed files with 98 additions and 87 deletions
|
|
@ -5,34 +5,34 @@ use rocksdb::{ReadOptions, ReadTier, WriteOptions};
|
|||
use crate::Engine;
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn cache_iter_options_default(db: &Arc<Engine>) -> ReadOptions {
|
||||
let mut options = iter_options_default(db);
|
||||
pub(crate) fn cache_iter_options_default(engine: &Arc<Engine>) -> ReadOptions {
|
||||
let mut options = iter_options_default(engine);
|
||||
options.set_read_tier(ReadTier::BlockCache);
|
||||
options.fill_cache(false);
|
||||
options
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn iter_options_default(db: &Arc<Engine>) -> ReadOptions {
|
||||
let mut options = read_options_default(db);
|
||||
pub(crate) fn iter_options_default(engine: &Arc<Engine>) -> ReadOptions {
|
||||
let mut options = read_options_default(engine);
|
||||
options.set_background_purge_on_iterator_cleanup(true);
|
||||
options
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn cache_read_options_default(db: &Arc<Engine>) -> ReadOptions {
|
||||
let mut options = read_options_default(db);
|
||||
pub(crate) fn cache_read_options_default(engine: &Arc<Engine>) -> ReadOptions {
|
||||
let mut options = read_options_default(engine);
|
||||
options.set_read_tier(ReadTier::BlockCache);
|
||||
options.fill_cache(false);
|
||||
options
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn read_options_default(db: &Arc<Engine>) -> ReadOptions {
|
||||
pub(crate) fn read_options_default(engine: &Arc<Engine>) -> ReadOptions {
|
||||
let mut options = ReadOptions::default();
|
||||
options.set_total_order_seek(true);
|
||||
|
||||
if !db.checksums {
|
||||
if !engine.checksums {
|
||||
options.set_verify_checksums(false);
|
||||
}
|
||||
|
||||
|
|
@ -40,4 +40,6 @@ pub(crate) fn read_options_default(db: &Arc<Engine>) -> ReadOptions {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn write_options_default(_db: &Arc<Engine>) -> WriteOptions { WriteOptions::default() }
|
||||
pub(crate) fn write_options_default(_engine: &Arc<Engine>) -> WriteOptions {
|
||||
WriteOptions::default()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue