Skip to content

Commit

Permalink
fix: fallback to window size in manifest (GreptimeTeam#4629)
Browse files Browse the repository at this point in the history
  • Loading branch information
evenyag authored and CookiePieWw committed Sep 17, 2024
1 parent e1c2b2c commit 3793c11
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/mito2/src/region/opener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ impl RegionOpener {
options.need_dedup(),
options.merge_mode(),
);
// Initial memtable id is 0.
let part_duration = options.compaction.time_window();
// Initial memtable id is 0.
let mutable = Arc::new(TimePartitions::new(
metadata.clone(),
memtable_builder.clone(),
Expand Down Expand Up @@ -335,8 +335,13 @@ impl RegionOpener {
region_options.need_dedup(),
region_options.merge_mode(),
);
// Use compaction time window in the manifest if region doesn't provide
// the time window option.
let part_duration = region_options
.compaction
.time_window()
.or(manifest.compaction_time_window);
// Initial memtable id is 0.
let part_duration = region_options.compaction.time_window();
let mutable = Arc::new(TimePartitions::new(
metadata.clone(),
memtable_builder.clone(),
Expand Down

0 comments on commit 3793c11

Please sign in to comment.