From c785a516aa6230a36fe48c9a96eb2a802125d5ad Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Mon, 19 Dec 2022 13:02:42 +0100 Subject: [PATCH] remove TimelineInfo.{Remote,Local} along with their types follow-up of https://github.com/neondatabase/neon/pull/2615 which is neon.git: 538876650a0c303aeae4fac71336a3d62aa6da28 must be deployed after cloud.git change https://github.com/neondatabase/cloud/issues/3232 fixes https://github.com/neondatabase/neon/issues/3041 --- libs/pageserver_api/src/models.rs | 23 --------------------- pageserver/src/http/openapi_spec.yml | 31 ---------------------------- pageserver/src/http/routes.rs | 16 ++------------ 3 files changed, 2 insertions(+), 68 deletions(-) diff --git a/libs/pageserver_api/src/models.rs b/libs/pageserver_api/src/models.rs index e49b7051d2..586ce2a73a 100644 --- a/libs/pageserver_api/src/models.rs +++ b/libs/pageserver_api/src/models.rs @@ -203,29 +203,6 @@ pub struct TimelineInfo { pub pg_version: u32, pub state: TimelineState, - - // Some of the above fields are duplicated in 'local' and 'remote', for backwards- - // compatility with older clients. - pub local: LocalTimelineInfo, - pub remote: RemoteTimelineInfo, -} - -#[serde_as] -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct LocalTimelineInfo { - #[serde_as(as = "Option")] - pub ancestor_timeline_id: Option, - #[serde_as(as = "Option")] - pub ancestor_lsn: Option, - pub current_logical_size: Option, // is None when timeline is Unloaded - pub current_physical_size: Option, // is None when timeline is Unloaded -} - -#[serde_as] -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct RemoteTimelineInfo { - #[serde_as(as = "Option")] - pub remote_consistent_lsn: Option, } pub type ConfigureFailpointsRequest = Vec; diff --git a/pageserver/src/http/openapi_spec.yml b/pageserver/src/http/openapi_spec.yml index b372410c0d..67cf4ea326 100644 --- a/pageserver/src/http/openapi_spec.yml +++ b/pageserver/src/http/openapi_spec.yml @@ -795,37 +795,6 @@ components: latest_gc_cutoff_lsn: type: string format: hex - - # These 'local' and 'remote' fields just duplicate some of the fields - # above. They are kept for backwards-compatibility. They can be removed, - # when the control plane has been updated to look at the above fields - # directly. - local: - $ref: "#/components/schemas/LocalTimelineInfo" - remote: - $ref: "#/components/schemas/RemoteTimelineInfo" - - LocalTimelineInfo: - type: object - properties: - ancestor_timeline_id: - type: string - format: hex - ancestor_lsn: - type: string - format: hex - current_logical_size: - type: integer - current_physical_size: - type: integer - RemoteTimelineInfo: - type: object - required: - - remote_consistent_lsn - properties: - remote_consistent_lsn: - type: string - format: hex Error: type: object required: diff --git a/pageserver/src/http/routes.rs b/pageserver/src/http/routes.rs index 0ef555c4aa..40d2a0e0ef 100644 --- a/pageserver/src/http/routes.rs +++ b/pageserver/src/http/routes.rs @@ -7,8 +7,8 @@ use remote_storage::GenericRemoteStorage; use tracing::*; use super::models::{ - LocalTimelineInfo, RemoteTimelineInfo, StatusResponse, TenantConfigRequest, - TenantCreateRequest, TenantCreateResponse, TenantInfo, TimelineCreateRequest, TimelineInfo, + StatusResponse, TenantConfigRequest, TenantCreateRequest, TenantCreateResponse, TenantInfo, + TimelineCreateRequest, TimelineInfo, }; use crate::pgdatadir_mapping::LsnForTimestamp; use crate::tenant::Timeline; @@ -147,18 +147,6 @@ fn build_timeline_info_common(timeline: &Arc) -> anyhow::Result