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

feat(pageserver): gc-compaction split job and partial scheduler #9897

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

skyzh
Copy link
Member

@skyzh skyzh commented Nov 26, 2024

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

@skyzh skyzh requested review from problame and arpad-m November 26, 2024 16:47
@skyzh skyzh requested a review from a team as a code owner November 26, 2024 16:47
pageserver/src/tenant/timeline/compaction.rs Outdated Show resolved Hide resolved
pageserver/src/tenant/timeline/compaction.rs Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Nov 26, 2024

7040 tests run: 6731 passed, 0 failed, 309 skipped (full report)


Flaky tests (7)

Postgres 17

Postgres 16

Code coverage* (full report)

  • functions: 31.4% (8326 of 26517 functions)
  • lines: 47.7% (65499 of 137253 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
4c86d0c at 2024-12-06T18:35:48.653Z :recycle:

Copy link
Contributor

@problame problame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, compaction_iteration is getting messier and messier.

As I already state in the base PR, I'm ok with the mess for now but this should be cleaned up before the end of this project.

pageserver/src/tenant.rs Show resolved Hide resolved
pageserver/src/tenant.rs Show resolved Hide resolved
pageserver/src/tenant/timeline/compaction.rs Outdated Show resolved Hide resolved
pageserver/src/tenant/timeline/compaction.rs Outdated Show resolved Hide resolved
pageserver/src/tenant/timeline/compaction.rs Outdated Show resolved Hide resolved
pageserver/src/tenant/timeline/compaction.rs Outdated Show resolved Hide resolved
pageserver/src/tenant/timeline/compaction.rs Outdated Show resolved Hide resolved
pageserver/src/tenant/timeline/compaction.rs Outdated Show resolved Hide resolved
Base automatically changed from skyzh/schedule-compaction to main December 5, 2024 19:39
@skyzh skyzh force-pushed the skyzh/schedule-partial-compaction branch from 2077ba4 to 15f26fe Compare December 5, 2024 20:44
skyzh added 3 commits December 5, 2024 15:49
Signed-off-by: Alex Chi Z <[email protected]>
Signed-off-by: Alex Chi Z <[email protected]>
@skyzh skyzh enabled auto-merge December 6, 2024 18:18
@skyzh skyzh added this pull request to the merge queue Dec 6, 2024
Merged via the queue into main with commit c42c28b Dec 6, 2024
82 checks passed
@skyzh skyzh deleted the skyzh/schedule-partial-compaction branch December 6, 2024 18:46
github-merge-queue bot pushed a commit that referenced this pull request Dec 12, 2024
## Problem

part of #9114, stacked PR
over #9897, partially
refactored to help with
#10031

## Summary of changes

* gc-compaction takes `above_lsn` parameter. We only compact the layers
above this LSN, and all data below the LSN are treated as if they are on
the ancestor branch.
* refactored gc-compaction to take `GcCompactJob` that describes the
rectangular range to be compacted.
* Added unit test for this case.

---------

Signed-off-by: Alex Chi Z <[email protected]>
Co-authored-by: Christian Schwarz <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Dec 19, 2024
…#10044)

## Problem

In #9897 we temporarily
disabled the layer valid check because the current one only considers
the end result of all compaction algorithms, but partial gc-compaction
would temporarily produce an "invalid" layer map.

part of #9114

## Summary of changes

Allow LSN splits to overlap in the slow path check. Currently, the valid
check is only used in storage scrubber (background job) and during
gc-compaction (without taking layer lock). Therefore, it's fine for such
checks to be a little bit inefficient but more accurate.

---------

Signed-off-by: Alex Chi Z <[email protected]>
Co-authored-by: Arpad Müller <[email protected]>
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.

3 participants