From 6ffa5138ce7e4a88566024e47dd7191e7190b8ea Mon Sep 17 00:00:00 2001 From: Joonas Koivunen Date: Mon, 21 Aug 2023 18:28:13 +0300 Subject: [PATCH] compaction: upload index on success otherwise test_gc_of_remote_layers fails --- pageserver/src/tenant/timeline.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pageserver/src/tenant/timeline.rs b/pageserver/src/tenant/timeline.rs index 452f6423eb..8cd9bb9a27 100644 --- a/pageserver/src/tenant/timeline.rs +++ b/pageserver/src/tenant/timeline.rs @@ -746,6 +746,13 @@ impl Timeline { self.compact_level0(layer_removal_cs.clone(), target_file_size, ctx) .await?; timer.stop_and_record(); + + if let Some(remote_client) = &self.remote_client { + // should any new image layer been created, not uploading index_part will + // result in a mismatch between remote_physical_size and layermap calculated + // size, which will fail some tests, but should not be an issue otherwise. + remote_client.schedule_index_upload_for_file_changes()?; + } } Err(err) => { // no partitioning? This is normal, if the timeline was just created