pub trait Compactor:
Send
+ Sync
+ 'static {
// Required methods
fn merge_ssts<'life0, 'life1, 'async_trait>(
&'life0 self,
compaction_region: &'life1 CompactionRegion,
picker_output: PickerOutput,
) -> Pin<Box<dyn Future<Output = Result<MergeOutput>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_manifest<'life0, 'life1, 'async_trait>(
&'life0 self,
compaction_region: &'life1 CompactionRegion,
merge_output: MergeOutput,
) -> Pin<Box<dyn Future<Output = Result<RegionEdit>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn compact<'life0, 'life1, 'async_trait>(
&'life0 self,
compaction_region: &'life1 CompactionRegion,
compact_request_options: Options,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Compactor is the trait that defines the compaction logic.
Required Methods§
Sourcefn merge_ssts<'life0, 'life1, 'async_trait>(
&'life0 self,
compaction_region: &'life1 CompactionRegion,
picker_output: PickerOutput,
) -> Pin<Box<dyn Future<Output = Result<MergeOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn merge_ssts<'life0, 'life1, 'async_trait>(
&'life0 self,
compaction_region: &'life1 CompactionRegion,
picker_output: PickerOutput,
) -> Pin<Box<dyn Future<Output = Result<MergeOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Merge SST files for a region.
Sourcefn update_manifest<'life0, 'life1, 'async_trait>(
&'life0 self,
compaction_region: &'life1 CompactionRegion,
merge_output: MergeOutput,
) -> Pin<Box<dyn Future<Output = Result<RegionEdit>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_manifest<'life0, 'life1, 'async_trait>(
&'life0 self,
compaction_region: &'life1 CompactionRegion,
merge_output: MergeOutput,
) -> Pin<Box<dyn Future<Output = Result<RegionEdit>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update the manifest after merging SST files.
Sourcefn compact<'life0, 'life1, 'async_trait>(
&'life0 self,
compaction_region: &'life1 CompactionRegion,
compact_request_options: Options,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn compact<'life0, 'life1, 'async_trait>(
&'life0 self,
compaction_region: &'life1 CompactionRegion,
compact_request_options: Options,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute compaction for a region.