Skip to main content

CompactOptions

Struct CompactOptions 

Source
pub struct CompactOptions { /* private fields */ }

Implementations§

Source§

impl CompactOptions

Source

pub fn set_exclusive_manual_compaction(&mut self, v: bool)

If more than one thread calls manual compaction, only one will actually schedule it while the other threads will simply wait for the scheduled manual compaction to complete. If exclusive_manual_compaction is set to true, the call will disable scheduling of automatic compaction jobs and wait for existing automatic compaction jobs to finish.

Source

pub fn set_bottommost_level_compaction( &mut self, lvl: BottommostLevelCompaction, )

Sets bottommost level compaction.

Source

pub fn set_change_level(&mut self, v: bool)

If true, compacted files will be moved to the minimum level capable of holding the data or given level (specified non-negative target_level).

Source

pub fn set_target_level(&mut self, lvl: c_int)

If change_level is true and target_level have non-negative value, compacted files will be moved to target_level.

Source

pub fn set_full_history_ts_low<S: Into<Vec<u8>>>(&mut self, ts: S)

Set user-defined timestamp low bound, the data with older timestamp than low bound maybe GCed by compaction. Default: nullptr

Source

pub fn set_blob_garbage_collection_age_cutoff(&mut self, v: c_double)

Override CompactRangeOptions::blob_garbage_collection_age_cutoff for a single manual compaction.

If set to < 0 or > 1, RocksDB leaves the blob_garbage_collection_age_cutoff from ColumnFamilyOptions in effect (this is the default, -1). Otherwise, it overrides the user-provided setting for the duration of this compaction. This enables callers to selectively override the age cutoff per compact_range call.

See Options::set_blob_gc_age_cutoff for the CF-level setter that this value overrides.

Source

pub fn get_blob_garbage_collection_age_cutoff(&self) -> f64

If set to < 0 or > 1, RocksDB leaves blob_garbage_collection_age_cutoff from ColumnFamilyOptions in effect. Otherwise, it will override the user-provided setting. This enables customers to selectively override the age cutoff.

Source

pub fn set_blob_garbage_collection_policy(&mut self, val: c_int)

If set to kForce, RocksDB will override enable_blob_file_garbage_collection to true; if set to kDisable, RocksDB will override it to false, and kUseDefault leaves the setting in effect. This enables customers to both force-enable and force-disable GC when calling CompactRange.

Source

pub fn get_blob_garbage_collection_policy(&self) -> c_int

Returns the value of the blob_garbage_collection_policy option.

Source

pub fn get_allow_write_stall(&self) -> bool

Returns the current allow_write_stall setting.

See Self::set_allow_write_stall for what this controls.

Source

pub fn get_bottommost_level_compaction(&self) -> bool

Returns the current bottommost_level_compaction setting.

See Self::set_bottommost_level_compaction for what this controls.

Source

pub fn get_change_level(&self) -> bool

Returns the current change_level setting.

See Self::set_change_level for what this controls.

Source

pub fn get_exclusive_manual_compaction(&self) -> bool

Returns the current exclusive_manual_compaction setting.

See Self::set_exclusive_manual_compaction for what this controls.

Source

pub fn get_max_subcompactions(&self) -> c_int

Returns the current max_subcompactions setting.

See Self::set_max_subcompactions for what this controls.

Source

pub fn get_target_level(&self) -> c_int

Returns the current target_level setting.

See Self::set_target_level for what this controls.

Source

pub fn get_target_path_id(&self) -> c_int

Returns the current target_path_id setting.

See Self::set_target_path_id for what this controls.

Source

pub fn set_allow_write_stall(&mut self, val: bool)

If true, the flush would proceed immediately even it means writes will stall for the duration of the flush; if false the operation will wait until it’s possible to do flush w/o causing stall or until required flush is performed by someone else (foreground call or background thread). Default: false.

Source

pub fn set_max_subcompactions(&mut self, val: c_int)

This value represents the maximum number of threads that will concurrently perform a compaction job by breaking it into multiple, smaller ones that are run simultaneously. Default: 1 (i.e. no subcompactions)

Dynamically changeable through SetDBOptions() API.

Source

pub fn set_target_path_id(&mut self, val: c_int)

Compaction outputs will be placed in options.db_paths[target_path_id]. Behavior is undefined if target_path_id is out of range.

Trait Implementations§

Source§

impl Default for CompactOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for CompactOptions

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Send for CompactOptions

Source§

impl Sync for CompactOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.