Skip to content

Commit

Permalink
feat: use cache in compaction (GreptimeTeam#3982)
Browse files Browse the repository at this point in the history
  • Loading branch information
evenyag authored and WenyXu committed May 21, 2024
1 parent b4ad8e9 commit 40a9dac
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 40a9dac

Please sign in to comment.