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): store reldir in sparse keyspace #10593

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

skyzh
Copy link
Member

@skyzh skyzh commented Jan 30, 2025

Problem

Part of #9516

Summary of changes

This patch adds the support for storing reldir in the sparse keyspace. All logic are guarded with the rel_size_v2_enabled flag, so if it's set to false, the code path is exactly the same as what's currently in prod.

Note that we did not persist the rel_size_v2_enabled flag and the logic around it will be implemented in the next patch. (i.e., what if we enabled it, restart the pageserver, and then it gets set to false? we should still read from v2 using the rel_size_v2_migration_status in the index_part).

I also refactored the metrics so that it can work with the new reldir store. However, this metric is not correctly computed for reldirs (see the comments) before. With the refactor, the value will be computed only when we have an initial value for the reldir size. The refactor keeps the incorrectness of the computation when there are more than 1 database.

Copy link

github-actions bot commented Jan 30, 2025

No tests were run or test report is not available

Test coverage report is not available

The comment gets automatically updated with the latest test results
8bb1147 at 2025-01-30T23:04:26.610Z :recycle:

@skyzh skyzh force-pushed the skyzh/reldir-sparse-1 branch from 3452185 to 4874546 Compare January 30, 2025 19:31
@skyzh skyzh force-pushed the skyzh/reldir-sparse-1 branch from 4874546 to f600ee7 Compare January 30, 2025 20:22
Signed-off-by: Alex Chi Z <[email protected]>
@skyzh skyzh force-pushed the skyzh/reldir-sparse-1 branch from 7ad75b9 to f3a89ff Compare January 30, 2025 20:56
Signed-off-by: Alex Chi Z <[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.

1 participant