-
Notifications
You must be signed in to change notification settings - Fork 458
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
feat(pageserver): support schedule gc-compaction #9809
Conversation
7040 tests run: 6731 passed, 0 failed, 309 skipped (full report)Flaky tests (2)Postgres 16
Postgres 15
Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
7a0274c at 2024-12-05T19:49:41.936Z :recycle: |
1427369
to
c4b2ea8
Compare
c343430
to
ca02663
Compare
Signed-off-by: Alex Chi Z <chi@neon.tech>
Signed-off-by: Alex Chi Z <chi@neon.tech>
Signed-off-by: Alex Chi Z <chi@neon.tech>
Signed-off-by: Alex Chi Z <chi@neon.tech>
4346c23
to
676d7f6
Compare
676d7f6
to
b8741fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to add a management API for clearing the scheduled compactions list.
I guess it can be achieved through tenant reset API, though.
The code in fn compaction_iteration
is quite messy. I think an abstraction to separate policy (what needs doing next) from the machinery to execute it (calling compact_with_options
) would be appropriate.
For example:
- comapction_iteration calls that abstraction
- the abstraction yields a
ScheduledCompactionTask
- the compaction_iteration invokes
compact_with_options
to execute
WDYT? Doesn't have to be done in tis PR but I'm unwilling to tolerate the messiness in the longer term.
Feel free to create a new issue that references this proposal.
Co-authored-by: Christian Schwarz <christian@neon.tech>
Yes I think we need a separation from compact options from compact task. We already have GcCompactionTask in compaction.rs. I'll do a refactor to separate them out after the patches go through. |
Signed-off-by: Alex Chi Z <chi@neon.tech>
I've created an issue to track that and I'll get it done by the next Wednesday to avoid having tech debt in the code #10031 |
Signed-off-by: Alex Chi Z <chi@neon.tech>
## Problem part of #9114, stacked PR over #9809 The compaction scheduler now schedules partial compaction jobs. ## Summary of changes * Add the compaction job splitter based on size. * Schedule subcompactions using the compaction scheduler. * Test subcompaction scheduler in the smoke regress test. * Temporarily disable layer map checks --------- Signed-off-by: Alex Chi Z <chi@neon.tech>
Problem
part of #9114
gc-compaction can take a long time. This patch adds support for scheduling a gc-compaction job. The compaction loop will first handle L0->L1 compaction, and then gc compaction. The scheduled jobs are stored in a non-persistent queue within the tenant structure.
This will be the building block for the partial compaction trigger -- if the system determines that we need to do a gc compaction, it will partition the keyspace and schedule several jobs. Each of these jobs will run for a short amount of time (i.e, 1 min). L0 compaction will be prioritized over gc compaction.
Summary of changes