From 8a6547720249c5449618e30a88f6f26ef5c206a5 Mon Sep 17 00:00:00 2001 From: Aleksandra Martyniuk Date: Thu, 31 Aug 2023 22:17:46 +0200 Subject: [PATCH] tasks: db: change default task_ttl value If a test isn't going to use task manager or isn't interested in statuses of finished tasks, then keeping them in the memory for some time (currently 10s by default) after they are finished is a memory waste. Set default task_ttl value to zero. It can be changed by setting --task-ttl-in-seconds or through rest api (/task_manager/ttl). In conf/scylla.yaml set task-ttl-in-seconds to 10. Closes #15239 --- conf/scylla.yaml | 3 +++ db/config.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/scylla.yaml b/conf/scylla.yaml index 5ad6a87ded..032614c1b7 100644 --- a/conf/scylla.yaml +++ b/conf/scylla.yaml @@ -570,6 +570,9 @@ murmur3_partitioner_ignore_msb_bits: 12 # may be lost if the node was not cleanly stopped. force_schema_commit_log: true +# Time for which task manager task is kept in memory after it completes. +task_ttl_in_seconds: 10 + # Use Raft to consistently manage schema information in the cluster. # Refer to https://docs.scylladb.com/master/architecture/raft.html for more details. # The 'Handling Failures' section is especially important. diff --git a/db/config.cc b/db/config.cc index 411607d6c8..84c98173b1 100644 --- a/db/config.cc +++ b/db/config.cc @@ -998,7 +998,7 @@ db::config::config(std::shared_ptr exts) "Ignore truncation record stored in system tables as if tables were never truncated.") , force_schema_commit_log(this, "force_schema_commit_log", value_status::Used, false, "Use separate schema commit log unconditionally rater than after restart following discovery of cluster-wide support for it.") - , task_ttl_seconds(this, "task_ttl_in_seconds", liveness::LiveUpdate, value_status::Used, 10, "Time for which information about finished task stays in memory.") + , task_ttl_seconds(this, "task_ttl_in_seconds", liveness::LiveUpdate, value_status::Used, 0, "Time for which information about finished task stays in memory.") , nodeops_watchdog_timeout_seconds(this, "nodeops_watchdog_timeout_seconds", liveness::LiveUpdate, value_status::Used, 120, "Time in seconds after which node operations abort when not hearing from the coordinator") , nodeops_heartbeat_interval_seconds(this, "nodeops_heartbeat_interval_seconds", liveness::LiveUpdate, value_status::Used, 10, "Period of heartbeat ticks in node operations") , cache_index_pages(this, "cache_index_pages", liveness::LiveUpdate, value_status::Used, true,