@@ -147,10 +147,7 @@ class TDqComputeActorBase : public NActors::TActorBootstrapped<TDerived>
147147
148148 static_cast <TDerived*>(this )->DoBootstrap ();
149149 } catch (const NKikimr::TMemoryLimitExceededException& e) {
150- InternalError (NYql::NDqProto::StatusIds::OVERLOADED, TIssuesIds::KIKIMR_PRECONDITION_FAILED, TStringBuilder ()
151- << " Mkql memory limit exceeded, limit: " << GetMkqlMemoryLimit ()
152- << " , host: " << HostName ()
153- << " , canAllocateExtraMemory: " << CanAllocateExtraMemory);
150+ OnMemoryLimitExceptionHandler ();
154151 } catch (const std::exception& e) {
155152 InternalError (NYql::NDqProto::StatusIds::INTERNAL_ERROR, TIssuesIds::UNEXPECTED, e.what ());
156153 }
@@ -225,10 +222,7 @@ class TDqComputeActorBase : public NActors::TActorBootstrapped<TDerived>
225222 TComputeActorClass* self = static_cast <TComputeActorClass*>(this );
226223 (self->*FuncBody)(ev);
227224 } catch (const NKikimr::TMemoryLimitExceededException& e) {
228- InternalError (NYql::NDqProto::StatusIds::OVERLOADED, TIssuesIds::KIKIMR_PRECONDITION_FAILED, TStringBuilder ()
229- << " Mkql memory limit exceeded, limit: " << GetMkqlMemoryLimit ()
230- << " , host: " << HostName ()
231- << " , canAllocateExtraMemory: " << CanAllocateExtraMemory);
225+ OnMemoryLimitExceptionHandler ();
232226 } catch (const std::exception& e) {
233227 if (PassExceptions) {
234228 throw ;
@@ -316,6 +310,20 @@ class TDqComputeActorBase : public NActors::TActorBootstrapped<TDerived>
316310
317311 virtual bool DoHandleChannelsAfterFinishImpl () = 0;
318312
313+ void OnMemoryLimitExceptionHandler () {
314+ TString memoryConsumptionDetails = MemoryLimits.MemoryQuotaManager ->MemoryConsumptionDetails ();
315+ TStringBuilder failureReason = TStringBuilder ()
316+ << " Mkql memory limit exceeded, limit: " << GetMkqlMemoryLimit ()
317+ << " , host: " << HostName ()
318+ << " , canAllocateExtraMemory: " << CanAllocateExtraMemory;
319+
320+ if (!memoryConsumptionDetails.empty ()) {
321+ failureReason << " , memory manager details: " << memoryConsumptionDetails;
322+ }
323+
324+ InternalError (NYql::NDqProto::StatusIds::OVERLOADED, TIssuesIds::KIKIMR_PRECONDITION_FAILED, failureReason);
325+ }
326+
319327 void ProcessOutputsImpl (ERunStatus status) {
320328 ProcessOutputsState.LastRunStatus = status;
321329
@@ -652,7 +660,7 @@ class TDqComputeActorBase : public NActors::TActorBootstrapped<TDerived>
652660 OutputTransformsMap.at (outputIndex).FinishIsAcknowledged = true ;
653661 ContinueExecute (EResumeSource::CATransformFinished);
654662 }
655-
663+
656664protected: // TDqComputeActorCheckpoints::ICallbacks
657665 // bool ReadyToCheckpoint() is pure and must be overriden in a derived class
658666
@@ -1491,7 +1499,7 @@ class TDqComputeActorBase : public NActors::TActorBootstrapped<TDerived>
14911499 if (inputDesc.HasSource ()) {
14921500 const auto watermarksMode = inputDesc.GetSource ().GetWatermarksMode ();
14931501 auto result = SourcesMap.emplace (
1494- i,
1502+ i,
14951503 static_cast <TDerived*>(this )->CreateInputHelper (LogPrefix, i, watermarksMode)
14961504 );
14971505 YQL_ENSURE (result.second );
@@ -1669,6 +1677,9 @@ class TDqComputeActorBase : public NActors::TActorBootstrapped<TDerived>
16691677 } else {
16701678 // in basic mode enum sources directly
16711679 for (auto & [inputIndex, sourceInfo] : SourcesMap) {
1680+ if (!sourceInfo.AsyncInput )
1681+ continue ;
1682+
16721683 const auto & ingressStats = sourceInfo.AsyncInput ->GetIngressStats ();
16731684 ingressBytes += ingressStats.Bytes ;
16741685 // ingress rows are usually not reported, so we count rows in task runner input
@@ -1691,6 +1702,9 @@ class TDqComputeActorBase : public NActors::TActorBootstrapped<TDerived>
16911702
16921703 for (auto & [outputIndex, sinkInfo] : SinksMap) {
16931704 if (auto * sink = GetSink (outputIndex, sinkInfo)) {
1705+ if (!sinkInfo.AsyncOutput )
1706+ continue ;
1707+
16941708 const auto & egressStats = sinkInfo.AsyncOutput ->GetEgressStats ();
16951709 const auto & pushStats = sink->GetPushStats ();
16961710 if (RuntimeSettings.CollectFull ()) {
0 commit comments