Skip to content
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

pageserver: simplify block_deletions handling #10261

Draft
wants to merge 8 commits into
base: erik/upload-reorder
Choose a base branch
from

Conversation

erikgrinaker
Copy link
Contributor

Problem

Upload queue reordering from #10218 may allow us to simplify the handling of block_deletions (such as #9844). Quote from internal Slack thread:

I've been looking at the race with uploads and blocked deletions in the context of the new upload queue reordering, which prevents upload/delete races and head-of-line blocking. I think we can probably get rid of all the complexity around blocked_deletions and recently_deleted now by simply not allowing scheduling of deletions when block_deletions=true. They would be left in the queue, and any operations that have an ordering dependency on them (i.e. reference the same file) would wait behind them, while other operations would be allowed to jump the queue and proceed. To unblock deletions, we simply set block_deletions=false and the operations would be processed in order.

Summary of changes

Block deletions in old generations in UploadQueue::is_ready(), and rely on UploadOp::can_bypass() to allow writes in the current generation to bypass the queue.

@erikgrinaker erikgrinaker force-pushed the erik/upload-block-deletions branch from 7259703 to 38148d3 Compare January 2, 2025 17:00
Copy link

github-actions bot commented Jan 2, 2025

6450 tests run: 6181 passed, 10 failed, 259 skipped (full report)


Failures on Postgres 17

Failures on Postgres 16

Failures on Postgres 15

Failures on Postgres 14

# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_issue_5878[release-pg14-same_generation] or test_issue_5878[release-pg14-same_generation] or test_issue_5878[release-pg15-same_generation] or test_issue_5878[release-pg15-same_generation] or test_issue_5878[release-pg16-same_generation] or test_issue_5878[release-pg16-same_generation] or test_issue_5878[release-pg17-same_generation] or test_issue_5878[release-pg17-same_generation] or test_issue_5878[release-pg17-same_generation] or test_issue_5878[release-pg17-same_generation]"
Flaky tests (3)

Postgres 17

Test coverage report is not available

The comment gets automatically updated with the latest test results
38148d3 at 2025-01-02T18:16:31.796Z :recycle:

@erikgrinaker erikgrinaker force-pushed the erik/upload-reorder branch 4 times, most recently from 419019e to e91e7e4 Compare January 4, 2025 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant