Skip to content

Commit

Permalink
pageserver: remove shard split hard link assertion (#9829)
Browse files Browse the repository at this point in the history
## Problem

We were hitting this assertion in debug mode tests sometimes.

This case was being hit when the parent shard has no resident layers.
For instance, this is the case on split retry where the previous attempt
shut-down the parent and deleted local state for it. If the logical size
calculation does not download some layers before we get to the
hardlinking, then the assertion is hit.

## Summary of Changes

Remove the assertion. It's fine for the ancestor to not have any
resident layers at the time of the split.

Closes #9412
  • Loading branch information
VladLazar authored Nov 20, 2024
1 parent f36f006 commit ee26f09
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pageserver/src/tenant/mgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1719,10 +1719,11 @@ impl TenantManager {
parent_layers.push(relative_path.to_owned());
}
}
debug_assert!(
!parent_layers.is_empty(),
"shutdown cannot empty the layermap"
);

if parent_layers.is_empty() {
tracing::info!("Ancestor shard has no resident layer to hard link");
}

(parent_timelines, parent_layers)
};

Expand Down

1 comment on commit ee26f09

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5626 tests run: 5389 passed, 1 failed, 236 skipped (full report)


Failures on Postgres 16

# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_sharded_ingest[release-pg16-github-actions-selfhosted-1]"
Flaky tests (2)

Postgres 16

Postgres 15

Code coverage* (full report)

  • functions: 31.4% (7943 of 25312 functions)
  • lines: 49.3% (63047 of 127877 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
ee26f09 at 2024-11-20T20:34:53.259Z :recycle:

Please sign in to comment.