Skip to content

Commit

Permalink
feat: Expose set_auto_readahead_size (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Dec 12, 2023
1 parent dcf7ee0 commit 46f44c3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/db_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3538,6 +3538,15 @@ impl ReadOptions {
}
}

/// Automatically trim readahead size when iterating with an upper bound.
///
/// Default: `false`
pub fn set_auto_readahead_size(&mut self, v: bool) {
unsafe {
ffi::rocksdb_readoptions_set_auto_readahead_size(self.inner, c_uchar::from(v));
}
}

/// If true, create a tailing iterator. Note that tailing iterators
/// only support moving in the forward direction. Iterating in reverse
/// or seek_to_last are not supported.
Expand Down

0 comments on commit 46f44c3

Please sign in to comment.