fix(scrubber): more logs wrt relic timelines (#11895)

## Problem

Further investigation on
https://github.com/neondatabase/neon/issues/11159 reveals that the
list_tenant function can find all the shards of the tenant, but then the
shard gets missing during the gc timeline list blob. One reason could be
that in some ways the timeline gets recognized as a relic timeline.

## Summary of changes

Add logging to help identify the issue.

Signed-off-by: Alex Chi Z <chi@neon.tech>
This commit is contained in:
Alex Chi Z.
2025-05-12 17:17:35 +08:00
committed by GitHub
parent a537b2ffd0
commit 307e1e64c8
2 changed files with 3 additions and 1 deletions

View File

@@ -355,6 +355,7 @@ pub(crate) async fn list_timeline_blobs(
match res {
ListTimelineBlobsResult::Ready(data) => Ok(data),
ListTimelineBlobsResult::MissingIndexPart(_) => {
tracing::warn!("listing raced with removal of an index, retrying");
// Retry if listing raced with removal of an index
let data = list_timeline_blobs_impl(remote_client, id, root_target)
.await?
@@ -441,7 +442,7 @@ async fn list_timeline_blobs_impl(
}
if index_part_keys.is_empty() && s3_layers.is_empty() {
tracing::debug!("Timeline is empty: expected post-deletion state.");
tracing::info!("Timeline is empty: expected post-deletion state.");
if initdb_archive {
tracing::info!("Timeline is post deletion but initdb archive is still present.");
}

View File

@@ -593,6 +593,7 @@ async fn gc_timeline(
index_part_snapshot_time: _,
} => (index_part, *index_part_generation, data.unused_index_keys),
BlobDataParseResult::Relic => {
tracing::info!("Skipping timeline {ttid}, it is a relic");
// Post-deletion tenant location: don't try and GC it.
return Ok(summary);
}