From 6f4d1daaec1c0572f88ee15cb3f74bbd62895759 Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 3 Jan 2024 14:47:32 +0000 Subject: [PATCH] pageserver_api: accomodate TenantShardId in location conf --- libs/pageserver_api/src/models.rs | 2 +- pageserver/client/src/mgmt_api.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/pageserver_api/src/models.rs b/libs/pageserver_api/src/models.rs index 4eb99c49aa..906e07e2f3 100644 --- a/libs/pageserver_api/src/models.rs +++ b/libs/pageserver_api/src/models.rs @@ -317,7 +317,7 @@ pub struct StatusResponse { #[derive(Serialize, Deserialize, Debug)] #[serde(deny_unknown_fields)] pub struct TenantLocationConfigRequest { - pub tenant_id: TenantId, + pub tenant_id: TenantShardId, #[serde(flatten)] pub config: LocationConfig, // as we have a flattened field, we should reject all unknown fields in it } diff --git a/pageserver/client/src/mgmt_api.rs b/pageserver/client/src/mgmt_api.rs index 44cef08095..5df11676b4 100644 --- a/pageserver/client/src/mgmt_api.rs +++ b/pageserver/client/src/mgmt_api.rs @@ -179,7 +179,10 @@ impl Client { config: LocationConfig, flush_ms: Option, ) -> Result<()> { - let req_body = TenantLocationConfigRequest { tenant_id, config }; + let req_body = TenantLocationConfigRequest { + tenant_id: tenant_shard_id, + config, + }; let path = format!( "{}/v1/tenant/{}/location_config", self.mgmt_api_endpoint, tenant_id