diff options
author | Filitov Mikhail <filitovme@gmail.com> | 2025-03-13 16:26:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-13 16:26:42 +0100 |
commit | b8e841f0c56e9f68d071bcfb1f30fe2b5d008a68 (patch) | |
tree | 74854d581f9f7d973c48303458cb2af2791551f7 | |
parent | 77fe41d992730f56122e972c538328c92ddd7631 (diff) | |
download | ydb-b8e841f0c56e9f68d071bcfb1f30fe2b5d008a68.tar.gz |
Return option to disable spilling (in channels in particular) (#15650)
-rw-r--r-- | ydb/core/kqp/compile_service/kqp_compile_actor.cpp | 1 | ||||
-rw-r--r-- | ydb/core/kqp/compile_service/kqp_compile_service.cpp | 4 | ||||
-rw-r--r-- | ydb/core/kqp/ut/spilling/kqp_scan_spilling_ut.cpp | 13 |
3 files changed, 14 insertions, 4 deletions
diff --git a/ydb/core/kqp/compile_service/kqp_compile_actor.cpp b/ydb/core/kqp/compile_service/kqp_compile_actor.cpp index f630188de5..cfbe2748c4 100644 --- a/ydb/core/kqp/compile_service/kqp_compile_actor.cpp +++ b/ydb/core/kqp/compile_service/kqp_compile_actor.cpp @@ -651,6 +651,7 @@ void ApplyServiceConfig(TKikimrConfiguration& kqpConfig, const TTableServiceConf kqpConfig.DefaultEnableShuffleElimination = serviceConfig.GetDefaultEnableShuffleElimination(); kqpConfig.EnableConstantFolding = serviceConfig.GetEnableConstantFolding(); kqpConfig.SetDefaultEnabledSpillingNodes(serviceConfig.GetEnableSpillingNodes()); + kqpConfig.EnableSpilling = serviceConfig.GetEnableQueryServiceSpilling(); kqpConfig.EnableSnapshotIsolationRW = serviceConfig.GetEnableSnapshotIsolationRW(); kqpConfig.AllowMultiBroadcasts = serviceConfig.GetAllowMultiBroadcasts(); diff --git a/ydb/core/kqp/compile_service/kqp_compile_service.cpp b/ydb/core/kqp/compile_service/kqp_compile_service.cpp index 8d882887e0..d329eddf89 100644 --- a/ydb/core/kqp/compile_service/kqp_compile_service.cpp +++ b/ydb/core/kqp/compile_service/kqp_compile_service.cpp @@ -314,6 +314,7 @@ private: bool defaultEnableShuffleElimination = TableServiceConfig.GetDefaultEnableShuffleElimination(); TString enableSpillingNodes = TableServiceConfig.GetEnableSpillingNodes(); + bool enableSpilling = TableServiceConfig.GetEnableQueryServiceSpilling(); bool enableSnapshotIsolationRW = TableServiceConfig.GetEnableSnapshotIsolationRW(); @@ -348,7 +349,8 @@ private: TableServiceConfig.GetEnablePerStatementQueryExecution() != enablePerStatementQueryExecution || TableServiceConfig.GetEnableSnapshotIsolationRW() != enableSnapshotIsolationRW || TableServiceConfig.GetAllowMultiBroadcasts() != allowMultiBroadcasts || - TableServiceConfig.GetDefaultEnableShuffleElimination() != defaultEnableShuffleElimination + TableServiceConfig.GetDefaultEnableShuffleElimination() != defaultEnableShuffleElimination || + TableServiceConfig.GetEnableQueryServiceSpilling() != enableSpilling ) { QueryCache->Clear(); diff --git a/ydb/core/kqp/ut/spilling/kqp_scan_spilling_ut.cpp b/ydb/core/kqp/ut/spilling/kqp_scan_spilling_ut.cpp index af9e1d63c9..1f255ce8b1 100644 --- a/ydb/core/kqp/ut/spilling/kqp_scan_spilling_ut.cpp +++ b/ydb/core/kqp/ut/spilling/kqp_scan_spilling_ut.cpp @@ -17,7 +17,11 @@ namespace { NKikimrConfig::TAppConfig AppCfg() { NKikimrConfig::TAppConfig appCfg; - auto* rm = appCfg.MutableTableServiceConfig()->MutableResourceManager(); + auto* ts = appCfg.MutableTableServiceConfig(); + ts->SetEnableQueryServiceSpilling(true); + + auto* rm = ts->MutableResourceManager(); + rm->SetChannelBufferSize(50); rm->SetMinChannelBufferSize(50); rm->SetMkqlLightProgramMemoryLimit(100 << 20); @@ -33,12 +37,15 @@ NKikimrConfig::TAppConfig AppCfg() { NKikimrConfig::TAppConfig AppCfgLowComputeLimits(double reasonableTreshold, bool enableSpilling=true, bool limitFileSize=false) { NKikimrConfig::TAppConfig appCfg; - auto* rm = appCfg.MutableTableServiceConfig()->MutableResourceManager(); + auto* ts = appCfg.MutableTableServiceConfig(); + ts->SetEnableQueryServiceSpilling(enableSpilling); + + auto* rm = ts->MutableResourceManager(); rm->SetMkqlLightProgramMemoryLimit(100); rm->SetMkqlHeavyProgramMemoryLimit(300); rm->SetSpillingPercent(reasonableTreshold); - auto* spilling = appCfg.MutableTableServiceConfig()->MutableSpillingServiceConfig()->MutableLocalFileConfig(); + auto* spilling = ts->MutableSpillingServiceConfig()->MutableLocalFileConfig(); spilling->SetEnable(enableSpilling); spilling->SetRoot("./spilling/"); |