-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(pageserver): ensure upload happens after delete #9844
Conversation
Signed-off-by: Alex Chi Z <chi@neon.tech>
5544 tests run: 5327 passed, 0 failed, 217 skipped (full report)Flaky tests (2)Postgres 17
Postgres 15
Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
2a7d002 at 2024-11-22T18:38:22.198Z :recycle: |
Signed-off-by: Alex Chi Z <chi@neon.tech>
I have no idea why 9e7fa98 will cause a lot of test failures but after reverting everything seems so good. |
Signed-off-by: Alex Chi Z <chi@neon.tech>
611bdbe
to
a3971c3
Compare
Signed-off-by: Alex Chi Z <chi@neon.tech>
c3ea93c
to
78c02f3
Compare
Signed-off-by: Alex Chi Z <chi@neon.tech>
I see how this PR addresses the case of deleting+recreating the same image layer within the lifetime of a |
Yes; in theory, this could happen, but it has not been observed yet, and I assume it is rarer to happen. wWe can fix it in another patch. The problem I would like to address is the race between future layer deletion and the upload of the same layer. Both operations happen after the tenant reattach. |
... and if I'm going to fix it, I will populate the |
Makes sense |
Problem
Follow up of #9682, that patch didn't fully address the problem: what if shutdown fails due to whatever reason and then we reattach the tenant? Then we will still remove the future layer. The underlying problem is that the fix for #5878 gets voided because of the generation optimizations.
Of course, we also need to ensure that delete happens after uploads, but note that we only schedule deletes when there are no ongoing upload tasks, so that's fine.
Summary of changes
Optimize deletion executor to skip validation if there are no files to delete.this doesn't work