Compare commits

...

1 Commits

Author SHA1 Message Date
Bojan Serafimov
940ea0ab2a Remove incorrect error handler 2022-06-07 09:28:09 -04:00

View File

@@ -1859,15 +1859,14 @@ impl LayeredTimeline {
let target_file_size = self.get_checkpoint_distance(); let target_file_size = self.get_checkpoint_distance();
// Define partitioning schema if needed // 1. Partition the key space
if let Ok(pgdir) = let pgdir = tenant_mgr::get_local_timeline_with_load(self.tenant_id, self.timeline_id)?;
tenant_mgr::get_local_timeline_with_load(self.tenant_id, self.timeline_id)
{
let (partitioning, lsn) = pgdir.repartition( let (partitioning, lsn) = pgdir.repartition(
self.get_last_record_lsn(), self.get_last_record_lsn(),
self.get_compaction_target_size(), self.get_compaction_target_size(),
)?; )?;
let timer = self.create_images_time_histo.start_timer(); let timer = self.create_images_time_histo.start_timer();
// 2. Create new image layers for partitions that have been modified // 2. Create new image layers for partitions that have been modified
// "enough". // "enough".
let mut layer_paths_to_upload = HashSet::with_capacity(partitioning.parts.len()); let mut layer_paths_to_upload = HashSet::with_capacity(partitioning.parts.len());
@@ -1891,9 +1890,6 @@ impl LayeredTimeline {
let timer = self.compact_time_histo.start_timer(); let timer = self.compact_time_histo.start_timer();
self.compact_level0(target_file_size)?; self.compact_level0(target_file_size)?;
timer.stop_and_record(); timer.stop_and_record();
} else {
debug!("Could not compact because no partitioning specified yet");
}
Ok(()) Ok(())
} }