From 56113900b3e373d0cae97774ed803c6f165a38e6 Mon Sep 17 00:00:00 2001 From: Jordan Hunt <65152573+jordanhunt22@users.noreply.github.com> Date: Wed, 23 Oct 2024 10:09:57 -0700 Subject: [PATCH] [Doc Retention] Tune knobs (#30835) GitOrigin-RevId: 17d71fc78d3a6c8fa23faef34fee6037e87f724b --- crates/common/src/knobs.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/common/src/knobs.rs b/crates/common/src/knobs.rs index 78983881..5155f983 100644 --- a/crates/common/src/knobs.rs +++ b/crates/common/src/knobs.rs @@ -346,7 +346,7 @@ pub static INDEX_RETENTION_DELETE_PARALLEL: LazyLock = /// How many parallel threads to use for deleting document log entries that have /// expired. pub static DOCUMENT_RETENTION_DELETE_PARALLEL: LazyLock = - LazyLock::new(|| env_config("DOCUMENT_RETENTION_DELETE_PARALLEL", 1)); + LazyLock::new(|| env_config("DOCUMENT_RETENTION_DELETE_PARALLEL", 2)); /// INDEX_RETENTION_DELAY determines the size of the index retention window. /// @@ -417,7 +417,7 @@ pub static INDEX_RETENTION_DELETE_CHUNK: LazyLock = /// Chunk size of documents for deleting from Persistence. pub static DOCUMENT_RETENTION_DELETE_CHUNK: LazyLock = - LazyLock::new(|| env_config("DOCUMENT_RETENTION_DELETE_CHUNK", 128)); + LazyLock::new(|| env_config("DOCUMENT_RETENTION_DELETE_CHUNK", 256)); /// Batch size of index entries to delete between checkpoints. pub static RETENTION_DELETE_BATCH: LazyLock = @@ -449,10 +449,7 @@ pub static RETENTION_FAIL_ALL_MULTIPLIER: LazyLock = /// also used to jitter document retention on startup to avoid a thundering /// herd. pub static DOCUMENT_RETENTION_BATCH_INTERVAL_SECONDS: LazyLock = LazyLock::new(|| { - Duration::from_secs(env_config( - "DOCUMENT_RETENTION_BATCH_INTERVAL_SECONDS", - 2 * 60, - )) + Duration::from_secs(env_config("DOCUMENT_RETENTION_BATCH_INTERVAL_SECONDS", 60)) }); /// Maximum scanned documents within a single run for document retention unless