Skip to content

Commit 470ff0b

Browse files
disable spilling (#15605)
1 parent 4b8e06e commit 470ff0b

File tree

9 files changed

+580
-113
lines changed

9 files changed

+580
-113
lines changed

ydb/core/kqp/compile_service/kqp_compile_actor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ void ApplyServiceConfig(TKikimrConfiguration& kqpConfig, const TTableServiceConf
651651
kqpConfig.EnableConstantFolding = serviceConfig.GetEnableConstantFolding();
652652
kqpConfig.SetDefaultEnabledSpillingNodes(serviceConfig.GetEnableSpillingNodes());
653653
kqpConfig.EnableSnapshotIsolationRW = serviceConfig.GetEnableSnapshotIsolationRW();
654+
kqpConfig.EnableSpilling = serviceConfig.GetEnableQueryServiceSpilling();
654655

655656
if (const auto limit = serviceConfig.GetResourceManager().GetMkqlHeavyProgramMemoryLimit()) {
656657
kqpConfig._KqpYqlCombinerMemoryLimit = std::max(1_GB, limit - (limit >> 2U));

ydb/core/kqp/compile_service/kqp_compile_service.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ class TKqpCompileService : public TActorBootstrapped<TKqpCompileService> {
311311
bool enableConstantFolding = TableServiceConfig.GetEnableConstantFolding();
312312

313313
TString enableSpillingNodes = TableServiceConfig.GetEnableSpillingNodes();
314+
bool enableSpilling = TableServiceConfig.GetEnableQueryServiceSpilling();
314315

315316
bool enableSnapshotIsolationRW = TableServiceConfig.GetEnableSnapshotIsolationRW();
316317

@@ -343,7 +344,8 @@ class TKqpCompileService : public TActorBootstrapped<TKqpCompileService> {
343344
TableServiceConfig.GetEnableImplicitQueryParameterTypes() != enableImplicitQueryParameterTypes ||
344345
TableServiceConfig.GetEnablePgConstsToParams() != enablePgConstsToParams ||
345346
TableServiceConfig.GetEnablePerStatementQueryExecution() != enablePerStatementQueryExecution ||
346-
TableServiceConfig.GetEnableSnapshotIsolationRW() != enableSnapshotIsolationRW) {
347+
TableServiceConfig.GetEnableSnapshotIsolationRW() != enableSnapshotIsolationRW ||
348+
TableServiceConfig.GetEnableQueryServiceSpilling() != enableSpilling) {
347349

348350
QueryCache->Clear();
349351

ydb/core/kqp/ut/join/data/join_order/tpcds78_1000s.json

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,8 @@
1919
"table":"test\/ds\/store_sales"
2020
},
2121
{
22-
"op_name":"Union",
23-
"args":
24-
[
25-
{
26-
"op_name":"TableFullScan",
27-
"table":"test\/ds\/date_dim"
28-
}
29-
]
22+
"op_name":"TableFullScan",
23+
"table":"test\/ds\/date_dim"
3024
}
3125
]
3226
},
@@ -55,14 +49,8 @@
5549
]
5650
},
5751
{
58-
"op_name":"Union",
59-
"args":
60-
[
61-
{
62-
"op_name":"TableFullScan",
63-
"table":"test\/ds\/date_dim"
64-
}
65-
]
52+
"op_name":"TableFullScan",
53+
"table":"test\/ds\/date_dim"
6654
}
6755
]
6856
}
@@ -87,14 +75,8 @@
8775
]
8876
},
8977
{
90-
"op_name":"Union",
91-
"args":
92-
[
93-
{
94-
"op_name":"TableFullScan",
95-
"table":"test\/ds\/date_dim"
96-
}
97-
]
78+
"op_name":"TableFullScan",
79+
"table":"test\/ds\/date_dim"
9880
}
9981
]
10082
}

ydb/core/kqp/ut/spilling/kqp_scan_spilling_ut.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ namespace {
1717
NKikimrConfig::TAppConfig AppCfg() {
1818
NKikimrConfig::TAppConfig appCfg;
1919

20-
auto* rm = appCfg.MutableTableServiceConfig()->MutableResourceManager();
20+
auto* ts = appCfg.MutableTableServiceConfig();
21+
ts->SetEnableQueryServiceSpilling(true);
22+
23+
auto* rm = ts->MutableResourceManager();
2124
rm->SetChannelBufferSize(50);
2225
rm->SetMinChannelBufferSize(50);
2326
rm->SetMkqlLightProgramMemoryLimit(100 << 20);
@@ -33,12 +36,16 @@ NKikimrConfig::TAppConfig AppCfg() {
3336
NKikimrConfig::TAppConfig AppCfgLowComputeLimits(double reasonableTreshold, bool enableSpilling=true, bool limitFileSize=false) {
3437
NKikimrConfig::TAppConfig appCfg;
3538

36-
auto* rm = appCfg.MutableTableServiceConfig()->MutableResourceManager();
39+
auto* ts = appCfg.MutableTableServiceConfig();
40+
41+
ts->SetEnableQueryServiceSpilling(enableSpilling);
42+
43+
auto* rm = ts->MutableResourceManager();
3744
rm->SetMkqlLightProgramMemoryLimit(100);
3845
rm->SetMkqlHeavyProgramMemoryLimit(300);
3946
rm->SetSpillingPercent(reasonableTreshold);
4047

41-
auto* spilling = appCfg.MutableTableServiceConfig()->MutableSpillingServiceConfig()->MutableLocalFileConfig();
48+
auto* spilling = ts->MutableSpillingServiceConfig()->MutableLocalFileConfig();
4249

4350
spilling->SetEnable(enableSpilling);
4451
spilling->SetRoot("./spilling/");

ydb/core/protos/table_service_config.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ message TTableServiceConfig {
304304

305305
optional uint64 QueryReplayCacheUploadTTLSec = 62 [default = 36000];
306306

307-
optional bool EnableQueryServiceSpilling = 63 [ default = true ];
307+
optional bool EnableQueryServiceSpilling = 63 [ default = false ];
308308

309309
optional uint32 DefaultCostBasedOptimizationLevel = 64 [default = 2];
310310

0 commit comments

Comments
 (0)