Skip to content

Commit

Permalink
feat: use cache in compaction (#3982)
Browse files Browse the repository at this point in the history
  • Loading branch information
evenyag authored May 20, 2024
1 parent 7da92eb commit df13832
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mito2/src/compaction/twcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ impl TwcsCompactionTask {
let reader = build_sst_reader(
metadata.clone(),
sst_layer.clone(),
Some(cache_manager.clone()),
&output.inputs,
append_mode,
output.filter_deleted,
Expand Down Expand Up @@ -700,12 +701,14 @@ pub(crate) struct CompactionOutput {
async fn build_sst_reader(
metadata: RegionMetadataRef,
sst_layer: AccessLayerRef,
cache: Option<CacheManagerRef>,
inputs: &[FileHandle],
append_mode: bool,
filter_deleted: bool,
) -> error::Result<BoxedBatchReader> {
let scan_input = ScanInput::new(sst_layer, ProjectionMapper::all(&metadata)?)
.with_files(inputs.to_vec())
.with_cache(cache)
.with_append_mode(append_mode)
.with_filter_deleted(filter_deleted)
// We ignore file not found error during compaction.
Expand Down

0 comments on commit df13832

Please sign in to comment.