neondatabase / neon

Neon: Serverless Postgres. We separated storage and compute to offer autoscaling, code-like database branching, and scale to zero.
https://neon.tech
Apache License 2.0
15.22k stars 444 forks source link

pageserver: remove shard split hard link assertion #9829

Closed VladLazar closed 1 day ago

VladLazar commented 2 days ago

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 https://github.com/neondatabase/neon/issues/9412

VladLazar commented 2 days ago

I agree that this assertion was bogus -- perhaps worth switching it for a warning though (and allow-list in tests), or at least an info! log.

I went for info level. I don't feel like it's interesting enough for a warning.

github-actions[bot] commented 1 day ago

5535 tests run: 5309 passed, 0 failed, 226 skipped (full report)


Flaky tests (2) #### Postgres 17 - `test_cancellations`: [debug-x86-64](https://neon-github-public-dev.s3.amazonaws.com/reports/pr-9829/11938570129/index.html#suites/6602039efab494a3e5fa83297c6565f4/74dc5d47aee33bbb/retries) #### Postgres 16 - `test_timeline_delete_works_for_remote_smoke`: [release-arm64](https://neon-github-public-dev.s3.amazonaws.com/reports/pr-9829/11938570129/index.html#suites/f588e0a787c49e67b29490359c589fae/680ae35ac6d748dd/retries)

Code coverage* (full report)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
249f165943bd2c492f96a3f7d250276e4addca1a at 2024-11-20T18:43:18.258Z :recycle: