Add tenant config option to allow timeline_offloading (#9598)

Allow us to enable timeline offloading for single tenants without having
to enable it for the entire pageserver.

Part of #8088.
This commit is contained in:
Arpad Müller
2024-11-04 21:01:18 +01:00
committed by GitHub
parent 1085fe57d3
commit ee68bbf6f5
6 changed files with 34 additions and 1 deletions

View File

@@ -403,6 +403,11 @@ impl PageServerNode {
lsn_lease_length_for_ts: settings
.remove("lsn_lease_length_for_ts")
.map(|x| x.to_string()),
timeline_offloading: settings
.remove("timeline_offloading")
.map(|x| x.parse::<bool>())
.transpose()
.context("Failed to parse 'timeline_offloading' as bool")?,
};
if !settings.is_empty() {
bail!("Unrecognized tenant settings: {settings:?}")
@@ -498,6 +503,11 @@ impl PageServerNode {
lsn_lease_length_for_ts: settings
.remove("lsn_lease_length_for_ts")
.map(|x| x.to_string()),
timeline_offloading: settings
.remove("timeline_offloading")
.map(|x| x.parse::<bool>())
.transpose()
.context("Failed to parse 'timeline_offloading' as bool")?,
}
};