compaction: reflect LayerE now managing remote client

This commit is contained in:
Joonas Koivunen
2023-08-16 16:43:31 +03:00
parent 26c39d7b4c
commit 366f3c8ff8

View File

@@ -3461,21 +3461,10 @@ impl Timeline {
layer_names_to_delete.push(delta.layer_desc().filename());
}
guard.finish_compact_l0(
&layer_removal_cs,
remove_layers,
&insert_layers,
&self.metrics,
)?;
guard.finish_compact_l0(&layer_removal_cs, remove_layers, &insert_layers)?;
drop_wlock(guard);
// Also schedule the deletions in remote storage
if let Some(remote_client) = &self.remote_client {
// FIXME: this needs to be moved to LayerE::drop possibly?
remote_client.schedule_layer_file_deletion(&layer_names_to_delete)?;
}
Ok(())
}