diff --git a/libs/remote_storage/src/local_fs.rs b/libs/remote_storage/src/local_fs.rs index b091fde41a..6468bcbf73 100644 --- a/libs/remote_storage/src/local_fs.rs +++ b/libs/remote_storage/src/local_fs.rs @@ -570,7 +570,8 @@ impl RemoteStorage for LocalFs { encryption_key: Option<&[u8]>, cancel: &CancellationToken, ) -> anyhow::Result<()> { - unimplemented!() + self.upload(from, data_size_bytes, to, metadata, cancel) + .await } async fn delete_objects( diff --git a/pageserver/src/tenant/remote_timeline_client.rs b/pageserver/src/tenant/remote_timeline_client.rs index 77c529ad97..2cddf413c8 100644 --- a/pageserver/src/tenant/remote_timeline_client.rs +++ b/pageserver/src/tenant/remote_timeline_client.rs @@ -1495,6 +1495,7 @@ impl RemoteTimelineClient { upload_queue.queued_operations.push_back(op); } + #[allow(dead_code)] fn is_kms_enabled(&self) -> bool { self.kms_impl.is_some() } diff --git a/pageserver/src/tenant/remote_timeline_client/index.rs b/pageserver/src/tenant/remote_timeline_client/index.rs index 748e2dea17..0f7894ab18 100644 --- a/pageserver/src/tenant/remote_timeline_client/index.rs +++ b/pageserver/src/tenant/remote_timeline_client/index.rs @@ -274,14 +274,16 @@ impl IndexPart { /// Check for invariants in the index: this is useful when uploading an index to ensure that if /// we encounter a bug, we do not persist buggy metadata. pub(crate) fn validate(&self) -> Result<(), String> { - if self.import_pgdata.is_none() - && self.metadata.ancestor_timeline().is_none() - && self.layer_metadata.is_empty() - { - // Unless we're in the middle of a raw pgdata import, or this is a child timeline,the index must - // always have at least one layer. - return Err("Index has no ancestor and no layers".to_string()); - } + // We have to disable this check: we might need to upload an empty index part with new keys, or new `reldirv2` flag. + + // if self.import_pgdata.is_none() + // && self.metadata.ancestor_timeline().is_none() + // && self.layer_metadata.is_empty() + // { + // // Unless we're in the middle of a raw pgdata import, or this is a child timeline,the index must + // // always have at least one layer. + // return Err("Index has no ancestor and no layers".to_string()); + // } Ok(()) }