Skip to content

Commit 0296fae

Browse files
committed
fix GetBlockFailed
1 parent a229523 commit 0296fae

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

be/src/pipeline/local_exchange/local_exchanger.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ bool Exchanger<BlockType>::_dequeue_data(LocalExchangeSourceLocalState* local_st
6666
local_state->_shared_state->sub_mem_usage(channel_id, block->_allocated_bytes);
6767
data_block->swap(block->_data_block);
6868
}
69+
70+
std::unique_lock l(*_m[channel_id]);
71+
// data_queue locked so that the size_approx is consistent with the actual queue size
72+
if (_data_queue[channel_id].data_queue.size_approx() == 0) {
73+
local_state->_dependency->block();
74+
}
75+
6976
return true;
7077
} else if (all_finished) {
7178
*eos = true;

0 commit comments

Comments
 (0)