risingwave_meta::hummock::compaction::selector

Trait CompactionSelector

source
pub trait CompactionSelector: Sync + Send {
    // Required methods
    fn pick_compaction(
        &mut self,
        task_id: HummockCompactionTaskId,
        context: CompactionSelectorContext<'_>,
    ) -> Option<CompactionTask>;
    fn name(&self) -> &'static str;
    fn task_type(&self) -> TaskType;

    // Provided method
    fn report_statistic_metrics(&self, _metrics: &MetaMetrics) { ... }
}

Required Methods§

source

fn pick_compaction( &mut self, task_id: HummockCompactionTaskId, context: CompactionSelectorContext<'_>, ) -> Option<CompactionTask>

source

fn name(&self) -> &'static str

source

fn task_type(&self) -> TaskType

Provided Methods§

Implementors§