pub struct CompactionConfig {Show 30 fields
pub max_bytes_for_level_base: u64,
pub max_level: u64,
pub max_bytes_for_level_multiplier: u64,
pub max_compaction_bytes: u64,
pub sub_level_max_compaction_bytes: u64,
pub level0_tier_compact_file_number: u64,
pub compaction_mode: i32,
pub compression_algorithm: Vec<String>,
pub target_file_size_base: u64,
pub compaction_filter_mask: u32,
pub max_sub_compaction: u32,
pub max_space_reclaim_bytes: u64,
pub split_by_state_table: bool,
pub split_weight_by_vnode: u32,
pub level0_stop_write_threshold_sub_level_number: u64,
pub level0_max_compact_file_number: u64,
pub level0_sub_level_compact_level_count: u32,
pub level0_overlapping_sub_level_compact_level_count: u32,
pub tombstone_reclaim_ratio: u32,
pub enable_emergency_picker: bool,
pub max_l0_compact_level_count: Option<u32>,
pub sst_allowed_trivial_move_min_size: Option<u64>,
pub disable_auto_group_scheduling: Option<bool>,
pub max_overlapping_level_size: Option<u64>,
pub emergency_level0_sst_file_count: Option<u32>,
pub emergency_level0_sub_level_partition: Option<u32>,
pub level0_stop_write_threshold_max_sst_count: Option<u32>,
pub level0_stop_write_threshold_max_size: Option<u64>,
pub sst_allowed_trivial_move_max_count: Option<u32>,
pub enable_optimize_l0_interval_selection: Option<bool>,
}
Fields§
§max_bytes_for_level_base: u64
§max_level: u64
§max_bytes_for_level_multiplier: u64
§max_compaction_bytes: u64
§sub_level_max_compaction_bytes: u64
§level0_tier_compact_file_number: u64
§compaction_mode: i32
§compression_algorithm: Vec<String>
§target_file_size_base: u64
§compaction_filter_mask: u32
§max_sub_compaction: u32
§max_space_reclaim_bytes: u64
§split_by_state_table: bool
§split_weight_by_vnode: u32
Compaction needs to cut the state table every time 1/weight of vnodes in the table have been processed.
level0_stop_write_threshold_sub_level_number: u64
soft limit for max number of sub level number
level0_max_compact_file_number: u64
§level0_sub_level_compact_level_count: u32
§level0_overlapping_sub_level_compact_level_count: u32
for tier compaction pick overlapping level
tombstone_reclaim_ratio: u32
§enable_emergency_picker: bool
§max_l0_compact_level_count: Option<u32>
The limitation of the level count of l0 compaction
sst_allowed_trivial_move_min_size: Option<u64>
The limitation of base level trivial move sst size
disable_auto_group_scheduling: Option<bool>
The limitation of auto group scheduling
max_overlapping_level_size: Option<u64>
The limitation of the max size of the overlapping-level for the compaction
hummock will reorg the commit-sstables to the multi overlapping-level if the size of the commit-sstables is larger than max_overlapping_level_size
emergency_level0_sst_file_count: Option<u32>
The emergency compaction limitations for the level0 sstables file count
emergency_level0_sub_level_partition: Option<u32>
The emergency compaction limitations for the level0 sub level partition
level0_stop_write_threshold_max_sst_count: Option<u32>
The limitation of the max sst count of the level0 to trigger the write stop
level0_stop_write_threshold_max_size: Option<u64>
The limitation of the max sst size of the level0 to trigger the write stop
sst_allowed_trivial_move_max_count: Option<u32>
The limitation of the max sst count of the trivial move task
enable_optimize_l0_interval_selection: Option<bool>
Enable the optimization of the interval selection for the level0 compaction
Implementations§
Source§impl CompactionConfig
impl CompactionConfig
Sourcepub fn compaction_mode(&self) -> CompactionMode
pub fn compaction_mode(&self) -> CompactionMode
Returns the enum value of compaction_mode
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_compaction_mode(&mut self, value: CompactionMode)
pub fn set_compaction_mode(&mut self, value: CompactionMode)
Sets compaction_mode
to the provided enum value.
Sourcepub fn max_l0_compact_level_count(&self) -> u32
pub fn max_l0_compact_level_count(&self) -> u32
Returns the value of max_l0_compact_level_count
, or the default value if max_l0_compact_level_count
is unset.
Sourcepub fn sst_allowed_trivial_move_min_size(&self) -> u64
pub fn sst_allowed_trivial_move_min_size(&self) -> u64
Returns the value of sst_allowed_trivial_move_min_size
, or the default value if sst_allowed_trivial_move_min_size
is unset.
Sourcepub fn disable_auto_group_scheduling(&self) -> bool
pub fn disable_auto_group_scheduling(&self) -> bool
Returns the value of disable_auto_group_scheduling
, or the default value if disable_auto_group_scheduling
is unset.
Sourcepub fn max_overlapping_level_size(&self) -> u64
pub fn max_overlapping_level_size(&self) -> u64
Returns the value of max_overlapping_level_size
, or the default value if max_overlapping_level_size
is unset.
Sourcepub fn emergency_level0_sst_file_count(&self) -> u32
pub fn emergency_level0_sst_file_count(&self) -> u32
Returns the value of emergency_level0_sst_file_count
, or the default value if emergency_level0_sst_file_count
is unset.
Sourcepub fn emergency_level0_sub_level_partition(&self) -> u32
pub fn emergency_level0_sub_level_partition(&self) -> u32
Returns the value of emergency_level0_sub_level_partition
, or the default value if emergency_level0_sub_level_partition
is unset.
Sourcepub fn level0_stop_write_threshold_max_sst_count(&self) -> u32
pub fn level0_stop_write_threshold_max_sst_count(&self) -> u32
Returns the value of level0_stop_write_threshold_max_sst_count
, or the default value if level0_stop_write_threshold_max_sst_count
is unset.
Sourcepub fn level0_stop_write_threshold_max_size(&self) -> u64
pub fn level0_stop_write_threshold_max_size(&self) -> u64
Returns the value of level0_stop_write_threshold_max_size
, or the default value if level0_stop_write_threshold_max_size
is unset.
Sourcepub fn sst_allowed_trivial_move_max_count(&self) -> u32
pub fn sst_allowed_trivial_move_max_count(&self) -> u32
Returns the value of sst_allowed_trivial_move_max_count
, or the default value if sst_allowed_trivial_move_max_count
is unset.
Sourcepub fn enable_optimize_l0_interval_selection(&self) -> bool
pub fn enable_optimize_l0_interval_selection(&self) -> bool
Returns the value of enable_optimize_l0_interval_selection
, or the default value if enable_optimize_l0_interval_selection
is unset.
Source§impl CompactionConfig
impl CompactionConfig
pub fn get_max_bytes_for_level_base(&self) -> u64
pub fn get_max_level(&self) -> u64
pub fn get_max_bytes_for_level_multiplier(&self) -> u64
pub fn get_max_compaction_bytes(&self) -> u64
pub fn get_sub_level_max_compaction_bytes(&self) -> u64
pub fn get_level0_tier_compact_file_number(&self) -> u64
pub fn get_compaction_mode(&self) -> Result<CompactionMode, PbFieldNotFound>
pub fn get_compression_algorithm(&self) -> &Vec<String>
pub fn get_target_file_size_base(&self) -> u64
pub fn get_compaction_filter_mask(&self) -> u32
pub fn get_max_sub_compaction(&self) -> u32
pub fn get_max_space_reclaim_bytes(&self) -> u64
pub fn get_split_by_state_table(&self) -> bool
pub fn get_split_weight_by_vnode(&self) -> u32
pub fn get_level0_stop_write_threshold_sub_level_number(&self) -> u64
pub fn get_level0_max_compact_file_number(&self) -> u64
pub fn get_level0_sub_level_compact_level_count(&self) -> u32
pub fn get_level0_overlapping_sub_level_compact_level_count(&self) -> u32
pub fn get_tombstone_reclaim_ratio(&self) -> u32
pub fn get_enable_emergency_picker(&self) -> bool
pub fn get_max_l0_compact_level_count(&self) -> Result<&u32, PbFieldNotFound>
pub fn get_sst_allowed_trivial_move_min_size( &self, ) -> Result<&u64, PbFieldNotFound>
pub fn get_disable_auto_group_scheduling( &self, ) -> Result<&bool, PbFieldNotFound>
pub fn get_max_overlapping_level_size(&self) -> Result<&u64, PbFieldNotFound>
pub fn get_emergency_level0_sst_file_count( &self, ) -> Result<&u32, PbFieldNotFound>
pub fn get_emergency_level0_sub_level_partition( &self, ) -> Result<&u32, PbFieldNotFound>
pub fn get_level0_stop_write_threshold_max_sst_count( &self, ) -> Result<&u32, PbFieldNotFound>
pub fn get_level0_stop_write_threshold_max_size( &self, ) -> Result<&u64, PbFieldNotFound>
pub fn get_sst_allowed_trivial_move_max_count( &self, ) -> Result<&u32, PbFieldNotFound>
pub fn get_enable_optimize_l0_interval_selection( &self, ) -> Result<&bool, PbFieldNotFound>
Trait Implementations§
Source§impl Clone for CompactionConfig
impl Clone for CompactionConfig
Source§fn clone(&self) -> CompactionConfig
fn clone(&self) -> CompactionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CompactionConfig
impl Debug for CompactionConfig
Source§impl Default for CompactionConfig
impl Default for CompactionConfig
Source§impl<'de> Deserialize<'de> for CompactionConfig
impl<'de> Deserialize<'de> for CompactionConfig
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Message for CompactionConfig
impl Message for CompactionConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl PartialEq for CompactionConfig
impl PartialEq for CompactionConfig
Source§impl Serialize for CompactionConfig
impl Serialize for CompactionConfig
impl Eq for CompactionConfig
impl StructuralPartialEq for CompactionConfig
Auto Trait Implementations§
impl Freeze for CompactionConfig
impl RefUnwindSafe for CompactionConfig
impl Send for CompactionConfig
impl Sync for CompactionConfig
impl Unpin for CompactionConfig
impl UnwindSafe for CompactionConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.