Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Expose set_auto_readahead_size #842

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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