aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorivanmorozov <ivanmorozov@ydb.tech>2023-12-14 16:24:13 +0300
committerivanmorozov <ivanmorozov@ydb.tech>2023-12-14 17:21:38 +0300
commita14823b7b2576a04da188c0bebccc0e92355f138 (patch)
tree108498e88a36be184ce0234cea9ee74f44f26755
parent44349aed979be88e8c147ea8bb8fa1cfd1789be9 (diff)
downloadydb-a14823b7b2576a04da188c0bebccc0e92355f138.tar.gz
KIKIMR-20538: background processes disabling
-rw-r--r--ydb/core/protos/config.proto3
-rw-r--r--ydb/core/tx/columnshard/columnshard_impl.cpp12
2 files changed, 15 insertions, 0 deletions
diff --git a/ydb/core/protos/config.proto b/ydb/core/protos/config.proto
index f9495d7150..844c793c71 100644
--- a/ydb/core/protos/config.proto
+++ b/ydb/core/protos/config.proto
@@ -1419,6 +1419,9 @@ message TColumnShardConfig {
optional TTablesStorageLayoutPolicy TablesStorageLayoutPolicy = 1;
optional bool DisabledOnSchemeShard = 2 [default = true];
optional bool SkipOldGranules = 3 [default = true];
+ optional bool IndexationEnabled = 4 [default = true];
+ optional bool CompactionEnabled = 5 [default = true];
+ optional bool TTLEnabled = 6 [default = true];
}
message TSchemeShardConfig {
diff --git a/ydb/core/tx/columnshard/columnshard_impl.cpp b/ydb/core/tx/columnshard/columnshard_impl.cpp
index 6c143dda48..7e27ea998b 100644
--- a/ydb/core/tx/columnshard/columnshard_impl.cpp
+++ b/ydb/core/tx/columnshard/columnshard_impl.cpp
@@ -772,6 +772,10 @@ void TColumnShard::StartIndexTask(std::vector<const NOlap::TInsertedData*>&& dat
}
void TColumnShard::SetupIndexation() {
+ if (!AppDataVerified().ColumnShardConfig.GetIndexationEnabled()) {
+ AFL_WARN(NKikimrServices::TX_COLUMNSHARD)("event", "skip_indexation")("reason", "disabled");
+ return;
+ }
BackgroundController.CheckDeadlinesIndexation();
if (BackgroundController.GetIndexingActiveCount()) {
AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD)("event", "skip_indexation")("reason", "in_progress")
@@ -818,6 +822,10 @@ void TColumnShard::SetupIndexation() {
}
void TColumnShard::SetupCompaction() {
+ if (!AppDataVerified().ColumnShardConfig.GetCompactionEnabled()) {
+ AFL_WARN(NKikimrServices::TX_COLUMNSHARD)("event", "skip_compaction")("reason", "disabled");
+ return;
+ }
CSCounters.OnSetupCompaction();
BackgroundController.CheckDeadlines();
@@ -845,6 +853,10 @@ void TColumnShard::SetupCompaction() {
}
bool TColumnShard::SetupTtl(const THashMap<ui64, NOlap::TTiering>& pathTtls, const bool force) {
+ if (!AppDataVerified().ColumnShardConfig.GetTTLEnabled()) {
+ AFL_WARN(NKikimrServices::TX_COLUMNSHARD)("event", "skip_ttl")("reason", "disabled");
+ return false;
+ }
CSCounters.OnSetupTtl();
if (BackgroundController.IsTtlActive()) {
ACFL_DEBUG("background", "ttl")("skip_reason", "in_progress");