@@ -596,6 +596,10 @@ class TGraceJoinSpillingSupportState : public TComputationValue<TGraceJoinSpilli
596596 }
597597
598598 EFetchResult FetchValues (TComputationContext& ctx, NUdf::TUnboxedValue*const * output) {
599+ if (!IsLogPrinted) {
600+ std::cerr << " [MISHA] new join\n " ;
601+ IsLogPrinted = true ;
602+ }
599603 while (true ) {
600604 switch (GetMode ()) {
601605 case EOperatingMode::InMemory: {
@@ -622,6 +626,8 @@ class TGraceJoinSpillingSupportState : public TComputationValue<TGraceJoinSpilli
622626 }
623627
624628private:
629+ bool IsLogPrinted = false ;
630+
625631 EOperatingMode GetMode () const {
626632 return Mode;
627633 }
@@ -800,6 +806,7 @@ class TGraceJoinSpillingSupportState : public TComputationValue<TGraceJoinSpilli
800806 }
801807
802808 }
809+ std::cerr << " [MISHA] join finished\n " ;
803810
804811 return EFetchResult::Finish;
805812 }
@@ -832,7 +839,7 @@ class TGraceJoinSpillingSupportState : public TComputationValue<TGraceJoinSpilli
832839void DoCalculateWithSpilling (TComputationContext& ctx) {
833840 UpdateSpilling ();
834841
835- if (!HasMemoryForProcessing ()) {
842+ if (!HasMemoryForProcessing () && !IsSpillingFinalized ) {
836843 bool isWaitingForReduce = TryToReduceMemoryAndWait ();
837844 if (isWaitingForReduce) return ;
838845 }
@@ -906,6 +913,7 @@ EFetchResult ProcessSpilledData(TComputationContext&, NUdf::TUnboxedValue*const*
906913
907914 NextBucketToJoin++;
908915 } else {
916+ std::cerr << " [MISHA] joining\n " ;
909917 *PartialJoinCompleted = true ;
910918 LeftPacker->StartTime = std::chrono::system_clock::now ();
911919 RightPacker->StartTime = std::chrono::system_clock::now ();
0 commit comments