delete local data when facing timeline that is marked as deleted in s3

This commit is contained in:
Dmitry Rodionov
2023-04-18 22:20:11 +03:00
parent 3b818d2bb1
commit efe914f056

View File

@@ -1069,7 +1069,12 @@ impl Tenant {
let index_part = match index_part {
MaybeDeletedIndexPart::IndexPart(index_part) => index_part,
MaybeDeletedIndexPart::Deleted => {
info!("is_deleted is set on remote, skipping");
info!("is_deleted is set on remote, proceeding to remove local data");
std::fs::remove_dir_all(
self.conf.timeline_path(&timeline_id, &self.tenant_id),
)
.context("remove_dir_all")?;
return Ok(());
}
};