Skip to content

Commit 654e1f2

Browse files
authored
randomize default spilling root (#6781)
1 parent cabd6c5 commit 654e1f2

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

ydb/core/kqp/proxy_service/kqp_proxy_service.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#include <library/cpp/lwtrace/mon/mon_lwtrace.h>
4545
#include <library/cpp/monlib/service/pages/templates.h>
4646
#include <library/cpp/resource/resource.h>
47-
47+
#include <util/generic/guid.h>
4848

4949
namespace NKikimr::NKqp {
5050

@@ -234,9 +234,14 @@ class TKqpProxyService : public TActorBootstrapped<TKqpProxyService> {
234234
WhiteBoardService = NNodeWhiteboard::MakeNodeWhiteboardServiceId(SelfId().NodeId());
235235

236236
if (auto& cfg = TableServiceConfig.GetSpillingServiceConfig().GetLocalFileConfig(); cfg.GetEnable()) {
237+
TString spillingRoot = cfg.GetRoot();
238+
if (spillingRoot.empty()) {
239+
spillingRoot = TStringBuilder() << "/tmp/ydb_spilling_" << CreateGuidAsString() << "/";
240+
}
241+
237242
SpillingService = TlsActivationContext->ExecutorThread.RegisterActor(NYql::NDq::CreateDqLocalFileSpillingService(
238243
NYql::NDq::TFileSpillingServiceConfig{
239-
.Root = cfg.GetRoot(),
244+
.Root = spillingRoot,
240245
.MaxTotalSize = cfg.GetMaxTotalSize(),
241246
.MaxFileSize = cfg.GetMaxFileSize(),
242247
.MaxFilePartSize = cfg.GetMaxFilePartSize(),

ydb/core/protos/table_service_config.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ message TTableServiceConfig {
4848
message TSpillingServiceConfig {
4949
message TLocalFileConfig {
5050
optional bool Enable = 1 [default = true];
51-
optional string Root = 2 [default = "/tmp/kikimr_spilling/"];
51+
optional string Root = 2 [default = ""];
5252
optional uint64 MaxTotalSize = 3 [default = 21474836480]; // 20 GiB
5353
optional uint64 MaxFileSize = 4 [default = 5368709120]; // 5 GiB
5454
optional uint64 MaxFilePartSize = 5 [default = 104857600]; // 100 MB

0 commit comments

Comments
 (0)