Skip to content

Commit ae93fc6

Browse files
yumkamblinkov
authored andcommitted
fix SendChannelData(): requirement !outputChannel.RetryState in async CA (#15338)
1 parent a72bdc4 commit ae93fc6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ydb/library/yql/dq/actors/compute/dq_async_compute_actor.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,15 @@ class TDqAsyncComputeActor : public TDqComputeActorBase<TDqAsyncComputeActor, TC
847847
auto it = OutputChannelsMap.find(ev->Get()->ChannelId);
848848
Y_ABORT_UNLESS(it != OutputChannelsMap.end());
849849
TOutputChannelInfo& outputChannel = it->second;
850+
// This condition was already checked in ProcessOutputsImpl, but since then
851+
// RetryState could've been changed. Recheck it once again:
852+
if (!Channels->ShouldSkipData(outputChannel.ChannelId) && !Channels->CanSendChannelData(outputChannel.ChannelId)) {
853+
// Once RetryState will be reset, channel will trigger either ResumeExecution or PeerFinished; either way execution will re-reach this function
854+
CA_LOG_D("OnOutputChannelData return because Channel can't send channel data, channel: " << outputChannel.ChannelId);
855+
outputChannel.PopStarted = false;
856+
ProcessOutputsState.Inflight--;
857+
return;
858+
}
850859
if (outputChannel.AsyncData) {
851860
CA_LOG_E("Data was not sent to the output channel in the previous step. Channel: " << outputChannel.ChannelId
852861
<< " Finished: " << outputChannel.Finished

0 commit comments

Comments
 (0)