-
Notifications
You must be signed in to change notification settings - Fork 841
feat(pageserver): enable reldirv2 by default in regress tests #12758
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
Open
skyzh
wants to merge
7
commits into
main
Choose a base branch
from
skyzh/try-reldirv2-test-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f6b1891
feat(pageserver): enable reldirv2 by default in regress tests, try 2
skyzh 7442d47
run some tests in validation mode
skyzh d37cd4b
always put a placeholder even in v2
skyzh 00091a4
fix tests
skyzh fd984a2
fix mypy
skyzh 6e0682e
index_part is source of truth
skyzh 5713ff3
remove stale comments
skyzh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -646,6 +646,8 @@ pub struct TenantConfigPatch { | |
| pub relsize_snapshot_cache_capacity: FieldPatch<usize>, | ||
| #[serde(skip_serializing_if = "FieldPatch::is_noop")] | ||
| pub basebackup_cache_enabled: FieldPatch<bool>, | ||
| #[serde(skip_serializing_if = "FieldPatch::is_noop")] | ||
| pub rel_size_v1_access_disabled: FieldPatch<bool>, | ||
| } | ||
|
|
||
| /// Like [`crate::config::TenantConfigToml`], but preserves the information | ||
|
|
@@ -783,6 +785,9 @@ pub struct TenantConfig { | |
|
|
||
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub basebackup_cache_enabled: Option<bool>, | ||
|
|
||
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub rel_size_v1_access_disabled: Option<bool>, | ||
| } | ||
|
|
||
| impl TenantConfig { | ||
|
|
@@ -830,6 +835,7 @@ impl TenantConfig { | |
| mut sampling_ratio, | ||
| mut relsize_snapshot_cache_capacity, | ||
| mut basebackup_cache_enabled, | ||
| mut rel_size_v1_access_disabled, | ||
| } = self; | ||
|
|
||
| patch.checkpoint_distance.apply(&mut checkpoint_distance); | ||
|
|
@@ -939,6 +945,9 @@ impl TenantConfig { | |
| patch | ||
| .basebackup_cache_enabled | ||
| .apply(&mut basebackup_cache_enabled); | ||
| patch | ||
| .rel_size_v1_access_disabled | ||
| .apply(&mut rel_size_v1_access_disabled); | ||
|
|
||
| Ok(Self { | ||
| checkpoint_distance, | ||
|
|
@@ -980,6 +989,7 @@ impl TenantConfig { | |
| sampling_ratio, | ||
| relsize_snapshot_cache_capacity, | ||
| basebackup_cache_enabled, | ||
| rel_size_v1_access_disabled, | ||
| }) | ||
| } | ||
|
|
||
|
|
@@ -1094,6 +1104,9 @@ impl TenantConfig { | |
| basebackup_cache_enabled: self | ||
| .basebackup_cache_enabled | ||
| .unwrap_or(global_conf.basebackup_cache_enabled), | ||
| rel_size_v1_access_disabled: self | ||
| .rel_size_v1_access_disabled | ||
| .unwrap_or(global_conf.rel_size_v1_access_disabled), | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -1526,12 +1539,15 @@ pub struct OffloadedTimelineInfo { | |
| pub archived_at: chrono::DateTime<chrono::Utc>, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | ||
| /// The state of the rel size migration. This is persisted in the index part. | ||
| /// compatibility. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: stray line? |
||
| #[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | ||
| #[serde(rename_all = "camelCase")] | ||
| pub enum RelSizeMigration { | ||
| /// The tenant is using the old rel_size format. | ||
| /// Note that this enum is persisted as `Option<RelSizeMigration>` in the index part, so | ||
| /// `None` is the same as `Some(RelSizeMigration::Legacy)`. | ||
| #[default] | ||
| Legacy, | ||
| /// The tenant is migrating to the new rel_size format. Both old and new rel_size format are | ||
| /// persisted in the storage. The read path will read both formats and validate them. | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit: can this get a doc comment please?