pageserver/config: disable image layer creation check threshold

This commit is contained in:
Vlad Lazar
2024-04-17 20:51:31 +01:00
parent d5708e7435
commit bea69ef9f4
2 changed files with 7 additions and 9 deletions

View File

@@ -59,7 +59,7 @@ pub mod defaults {
pub const DEFAULT_EVICTIONS_LOW_RESIDENCE_DURATION_METRIC_THRESHOLD: &str = "24 hour";
// By default ingest enough WAL for two new L0 layers before checking if new image
// image layers should be created.
pub const DEFAULT_IMAGE_LAYER_CREATION_CHECK_THRESHOLD: u8 = 2;
pub const DEFAULT_IMAGE_LAYER_CREATION_CHECK_THRESHOLD: u8 = 0;
pub const DEFAULT_INGEST_BATCH_SIZE: u64 = 100;
}

View File

@@ -1742,15 +1742,13 @@ impl Timeline {
}
fn get_image_layer_creation_check_threshold(&self) -> u8 {
let tenant_conf = self.tenant_conf.load();
tenant_conf
.tenant_conf
// Ignore the tenant config override and use the default.
// This was done as a quick fix to resolve a perf degrdation.
// TODO: figure out if we wish to keep this config and related functionality
// If not, deprecate the config gracefully.
self.conf
.default_tenant_conf
.image_layer_creation_check_threshold
.unwrap_or(
self.conf
.default_tenant_conf
.image_layer_creation_check_threshold,
)
}
pub(super) fn tenant_conf_updated(&self, new_conf: &TenantConfOpt) {