Skip to content

Commit a537476

Browse files
committed
Add log messages for spilling
1 parent 97cf2a8 commit a537476

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ydb/library/yql/minikql/comp_nodes/mkql_wide_top_sort.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,9 @@ using TBase = TComputationValue<TSpillingSupportState<Sort, HasCount>>;
412412
}
413413
ResetFields();
414414
auto nextMode = (IsReadFromChannelFinished() ? EOperatingMode::ProcessSpilled : EOperatingMode::InMemory);
415+
416+
YQL_LOG(INFO) << (nextMode == EOperatingMode::ProcessSpilled ? "Switching to ProcessSpilled" : "Switching to Memory mode");
417+
415418
SwitchMode(nextMode);
416419
return true;
417420
}
@@ -442,6 +445,12 @@ using TBase = TComputationValue<TSpillingSupportState<Sort, HasCount>>;
442445
if constexpr (!HasCount) {
443446
ResetFields();
444447
if (Ctx.SpillerFactory && !HasMemoryForProcessing()) {
448+
const auto used = TlsAllocState->GetUsed();
449+
const auto limit = TlsAllocState->GetLimit();
450+
451+
YQL_LOG(INFO) << "Yellow zone reached " << (used*100/limit) << "%=" << used << "/" << limit;
452+
YQL_LOG(INFO) << "Switching Memory mode to Spilling";
453+
445454
SwitchMode(EOperatingMode::Spilling);
446455
}
447456
return;

0 commit comments

Comments
 (0)