From 547acb66537c760d0c8a29828366861e2e3fa633 Mon Sep 17 00:00:00 2001 From: John Spray Date: Tue, 24 Oct 2023 17:07:44 +0100 Subject: [PATCH] pageserver: create timelines/ dir when configuring secondary location --- pageserver/src/tenant/mgr.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pageserver/src/tenant/mgr.rs b/pageserver/src/tenant/mgr.rs index 379e526e7f..088305e876 100644 --- a/pageserver/src/tenant/mgr.rs +++ b/pageserver/src/tenant/mgr.rs @@ -902,12 +902,12 @@ impl TenantManager { let new_slot = match &new_location_config.mode { LocationMode::Secondary(_) => { - let tenant_path = self.conf.tenant_path(&tenant_id); + let timelines_path = self.conf.timelines_path(&tenant_id); // Directory doesn't need to be fsync'd because if we crash it can // safely be recreated next time this tenant location is configured. - unsafe_create_dir_all(&tenant_path) + unsafe_create_dir_all(&timelines_path) .await - .with_context(|| format!("Creating {tenant_path}"))?; + .with_context(|| format!("Creating {timelines_path}"))?; Tenant::persist_tenant_config(self.conf, &tenant_id, &new_location_config) .await