File tree 2 files changed +11
-2
lines changed 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ using VSessions = NKikimr::NSysView::Schema::QuerySessions;
71
71
using namespace NKikimrConfig ;
72
72
73
73
74
+ TString RandomSpillingRootString () {
75
+ return ToString (RandomNumber<ui32>());
76
+ }
77
+
74
78
std::optional<ui32> TryDecodeYdbSessionId (const TString& sessionId) {
75
79
if (sessionId.empty ()) {
76
80
return std::nullopt;
@@ -234,9 +238,14 @@ class TKqpProxyService : public TActorBootstrapped<TKqpProxyService> {
234
238
WhiteBoardService = NNodeWhiteboard::MakeNodeWhiteboardServiceId (SelfId ().NodeId ());
235
239
236
240
if (auto & cfg = TableServiceConfig.GetSpillingServiceConfig ().GetLocalFileConfig (); cfg.GetEnable ()) {
241
+ TString spillingRoot = cfg.GetRoot ();
242
+ if (spillingRoot.empty ()) {
243
+ spillingRoot = TStringBuilder () << " /tmp/ydb_spilling_" << RandomSpillingRootString () << " /" ;
244
+ }
245
+
237
246
SpillingService = TlsActivationContext->ExecutorThread .RegisterActor (NYql::NDq::CreateDqLocalFileSpillingService (
238
247
NYql::NDq::TFileSpillingServiceConfig{
239
- .Root = cfg. GetRoot () ,
248
+ .Root = spillingRoot ,
240
249
.MaxTotalSize = cfg.GetMaxTotalSize (),
241
250
.MaxFileSize = cfg.GetMaxFileSize (),
242
251
.MaxFilePartSize = cfg.GetMaxFilePartSize (),
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ message TTableServiceConfig {
48
48
message TSpillingServiceConfig {
49
49
message TLocalFileConfig {
50
50
optional bool Enable = 1 [default = true ];
51
- optional string Root = 2 [default = "/tmp/kikimr_spilling/ " ];
51
+ optional string Root = 2 [default = "" ];
52
52
optional uint64 MaxTotalSize = 3 [default = 21474836480 ]; // 20 GiB
53
53
optional uint64 MaxFileSize = 4 [default = 5368709120 ]; // 5 GiB
54
54
optional uint64 MaxFilePartSize = 5 [default = 104857600 ]; // 100 MB
You can’t perform that action at this time.
0 commit comments