storcon: avoid storing pageserver_api::models::TenantConf
's null
fields in db & API output
#9983
Labels
a/tech_debt
Area: related to tech debt
c/storage/controller
Component: Storage Controller
c/storage/pageserver
Component: storage: pageserver
Problem
Storcon currently uses the serde_json-serialized representation of
pageserver_api::models::TenantConf
to represent desired tenant config in storcon db.The same type is also used in API responses.
Most often, all fields except
pitr_interval
arenull
, meaning fallback to thepagesever.toml
's default tenant config value.This is wasteful in terms of space usage but more importantly it's annoying for humans when they inspect a specific tenant, e.g. via
storcon_cli tenant-describe
because all thesenull
values make it hard to spot the actual overrides.Solution
Use
skip_serializing_if(Option::is_none)
.That would make the output a lot smaller, actually
{}
for most tenants.Before doing this, we need to investigate whether this poses a compatibility problem.
Refs
The text was updated successfully, but these errors were encountered: