diff --git a/libs/pageserver_api/src/models.rs b/libs/pageserver_api/src/models.rs index 67d4685183..690feb5760 100644 --- a/libs/pageserver_api/src/models.rs +++ b/libs/pageserver_api/src/models.rs @@ -1539,7 +1539,7 @@ pub struct OffloadedTimelineInfo { pub archived_at: chrono::DateTime, } -/// The state of the rel size migration. This is persisted in the DbDir key and index part. Do not change without considering +/// The state of the rel size migration. This is persisted in the index part. /// compatibility. #[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] diff --git a/pageserver/src/tenant/remote_timeline_client/index.rs b/pageserver/src/tenant/remote_timeline_client/index.rs index dfdfb0d835..5ed7995659 100644 --- a/pageserver/src/tenant/remote_timeline_client/index.rs +++ b/pageserver/src/tenant/remote_timeline_client/index.rs @@ -83,7 +83,6 @@ pub struct IndexPart { #[serde(skip_serializing_if = "Option::is_none", default)] pub(crate) last_aux_file_policy: Option, - /// Deprecated: the field is not used anymore and the source of truth is now stored in the dbdir key. #[serde(skip_serializing_if = "Option::is_none", default)] pub(crate) rel_size_migration: Option, @@ -116,7 +115,6 @@ pub struct IndexPart { #[serde(skip_serializing_if = "Option::is_none", default)] pub(crate) marked_invisible_at: Option, - /// Deprecated: the field is not used anymore and the source of truth is now stored in the dbdir key. #[serde(skip_serializing_if = "Option::is_none", default)] pub(crate) rel_size_migrated_at: Option, } diff --git a/pageserver/src/tenant/timeline.rs b/pageserver/src/tenant/timeline.rs index db64a4f314..6b363f2725 100644 --- a/pageserver/src/tenant/timeline.rs +++ b/pageserver/src/tenant/timeline.rs @@ -2883,10 +2883,9 @@ impl Timeline { .unwrap_or(self.conf.default_tenant_conf.compaction_threshold) } - /// Returns the expected state of the rel size migration. The actual state is persisted in the - /// DbDir key. - /// - /// The expected state is the state that the tenant config expects. + /// Returns `true` if the rel_size_v2 config is enabled. NOTE: the write path and read path + /// should look at `get_rel_size_v2_status()` to get the actual status of the timeline. It is + /// possible that the index part persists the state while the config doesn't get persisted. pub(crate) fn get_rel_size_v2_expected_state(&self) -> RelSizeMigration { let tenant_conf = self.tenant_conf.load(); let v2_enabled = tenant_conf