diff --git a/pageserver/src/tenant.rs b/pageserver/src/tenant.rs index 259fd25e6c8b1..cb3ca9c8b9bc6 100644 --- a/pageserver/src/tenant.rs +++ b/pageserver/src/tenant.rs @@ -7341,7 +7341,8 @@ mod tests { #[tokio::test] async fn test_simple_bottom_most_compaction_with_retain_lsns() -> anyhow::Result<()> { - let harness = TenantHarness::create("test_simple_bottom_most_compaction_with_retain_lsns").await?; + let harness = + TenantHarness::create("test_simple_bottom_most_compaction_with_retain_lsns").await?; let (tenant, ctx) = harness.load().await; fn get_key(id: u32) -> Key { diff --git a/pageserver/src/tenant/timeline/compaction.rs b/pageserver/src/tenant/timeline/compaction.rs index b1383a105eb5c..82b7845fde206 100644 --- a/pageserver/src/tenant/timeline/compaction.rs +++ b/pageserver/src/tenant/timeline/compaction.rs @@ -1281,7 +1281,11 @@ impl Timeline { if cfg!(debug_assertions) { assert_eq!( lowest_retain_lsn, - *retain_lsns_below_horizon.iter().min().unwrap() + *retain_lsns_below_horizon + .iter() + .min() + .copied() + .unwrap_or(gc_cutoff) ); } info!(