Closed VladLazar closed 1 day 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.
functions
: 31.4% (7940 of 25304 functions)
lines
: 49.3% (63015 of 127795 lines)
* collected from Rust tests only
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