From 764d27f6960c4eb48335c5576f601dbb1524a59f Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Wed, 1 Mar 2023 18:42:14 +0100 Subject: [PATCH] fix checkpoint_timeout serialization in TenantConf Without this change, when actually setting this conf opt, the tenant would become Broken next time we load it. Why? The serde_toml representation that persist_tenant_conf would write out would be a TOML inline table of `secs` and `nsecs`. But our hand-rolled TenantConf parser expects a TOML string. I checked that all other `Duration` values in TenantConfOpt use the humantime serialization. Issues like this would likely be systematically prevent by https://github.com/neondatabase/neon/issues/3682 --- pageserver/src/tenant/config.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pageserver/src/tenant/config.rs b/pageserver/src/tenant/config.rs index fca08dd51a..1a52b26ae7 100644 --- a/pageserver/src/tenant/config.rs +++ b/pageserver/src/tenant/config.rs @@ -103,6 +103,7 @@ pub struct TenantConfOpt { pub checkpoint_distance: Option, #[serde(skip_serializing_if = "Option::is_none")] + #[serde(with = "humantime_serde")] #[serde(default)] pub checkpoint_timeout: Option,