fix missing iteration-optimized read options on several stream types
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
d59f68a51a
commit
94f2384fb0
6 changed files with 28 additions and 18 deletions
|
@ -2,24 +2,33 @@ use rocksdb::{ReadOptions, ReadTier, WriteOptions};
|
|||
|
||||
#[inline]
|
||||
pub(crate) fn iter_options_default() -> ReadOptions {
|
||||
let mut read_options = read_options_default();
|
||||
read_options.set_background_purge_on_iterator_cleanup(true);
|
||||
//read_options.set_pin_data(true);
|
||||
read_options
|
||||
let mut options = read_options_default();
|
||||
options.set_background_purge_on_iterator_cleanup(true);
|
||||
//options.set_pin_data(true);
|
||||
options
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn cache_iter_options_default() -> ReadOptions {
|
||||
let mut options = cache_read_options_default();
|
||||
options.set_background_purge_on_iterator_cleanup(true);
|
||||
//options.set_pin_data(true);
|
||||
options
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn cache_read_options_default() -> ReadOptions {
|
||||
let mut read_options = read_options_default();
|
||||
read_options.set_read_tier(ReadTier::BlockCache);
|
||||
read_options
|
||||
let mut options = read_options_default();
|
||||
options.set_read_tier(ReadTier::BlockCache);
|
||||
options.fill_cache(false);
|
||||
options
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn read_options_default() -> ReadOptions {
|
||||
let mut read_options = ReadOptions::default();
|
||||
read_options.set_total_order_seek(true);
|
||||
read_options
|
||||
let mut options = ReadOptions::default();
|
||||
options.set_total_order_seek(true);
|
||||
options
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue