Skip to content

Commit

Permalink
feat: Expose set_auto_readahead_size (rust-rocksdb#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf authored and zaidoon committed Feb 19, 2024
1 parent 3a2bab8 commit 176bc11
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 @@ -3533,6 +3533,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 176bc11

Please sign in to comment.